What @heymajor says is spot on, and I think the flaw in your thinking @zberwaldt is highlighted by your use of the word “investment”.
Learning to code isn’t like investing in a stock, or building a house, or buying a car. There isn’t a direct tangible return on your investment, and once your done you aren’t going to be able to continue making that money from your “investment” forever. In fact, the only people I see burn out and get flushed out of the industry are the people who think they just need to invest in barely learning one programming language to have a career for 30 years.
The reason this doesn’t work is the programming world is a fashion industry that is easily influenced by terrible ideas. All it takes is for one narcissist to declare his language defeats some enemy created by other languages and tons of programmers come flocking to it like flies to turds. Take Node.js as an example: Events over threads. The only reason it was popular was entirely because they marketed it as defeating the enemy that is threads…which is just asinine, but it worked. Now it’s one of the most popular platforms in the world.
So, you’ll invest in Python and then one day, all the Python programmers leave for whatever reason, and you’re left with absolutely nothing for your investment. In a way that makes it a lot more like a stock investment, but a very risky stock investment.
The other flaw in the “investment” mindset is that if you pick wrong you somehow lose everything. You pick some obscure language, invest hours and hours learning it, and then you can’t find a job so it was all for nothing! You got nothing! But, that’s also not true at all, for a specific reason:
Your brain is not static or fixed, and learning a programming language doesn’t mean you cannot learn any other languages. In fact, the inverse is true: The more programming languages you learn the better you get at both programming and learning programming concepts. Every programming language you learn is an investment in being a better programmer, and it makes it easier to learn when you get your first job. Why is that important?
Every place I’ve learned does not write Python. They write a special brand of weird as hell Python only they understand. By getting better at learning programming languages you train yourself to be able to pick up the strange weird way any company uses their programming language, and that makes you more productive and competitive. As a side benefit, when all the Python programmers decide to walk away from it, and companies are hiring, you can sit down for a week and pick up the new hotness and continue with your career.
The best attitude to have with regard to learning to code is one of a vacation. You don’t figure out where you want to visit on vacation by how much return on your investment you’ll get. You pick a place to go that you find interesting or that you’ve dreamed of visiting. Once you’re done with your vacation you don’t lose the experience, you benefit from the experience and have memories you keep for a while. Even if the vacation is terrible you don’t lose anything but the time for that trip, and honestly, you still learn something. Finally, once you’ve done a ton of traveling it’s easier for you to do more traveling, or even move and improve your life in another country.
So, don’t think of “investing” your time in Python as the same as investing in learning to code. If you want to really learn the fundamentals of programming then learning 3-4 programming languages is the key, and learning more than one programming language makes you more viable and a hiring prospect than less viable. In fact, I believe that spending time learning basic coding in 4 programming languages will make you a stronger programmer quicker than if you spend the same time learning the platforms of one language.
So, stick with Python, but understand it’s not going to last forever, and you’ll be better off looking at it as a temporary vacation than an investment.