How long does it take to learn a programming langauge?Watch
If you study regularly, you should be able to make good progress within a year. Less if you work harder. After a year of study, you’ll be at the level of a “junior programmer.” You won’t be a “proficient” programmer, but you should be competent enough to start an entry-level position in IT. Whether you get hired, however, will depend on a lot of other things.
Your question is actually vague,
To get you out of a beginner level would take you atleast a year or two. To get you to a pro level takes a LOT longer. Probably 4+ years.
since java/python are OO languages, there are other related stuff that would help to learn for it too.