Exercism.io is great for testing and improving skills, and they have exercises for both Java and Python. It's free.
You get a problem to solve, then you continue working on coding your solution to that problem until all tests pass, then you move on to the next.