Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A Java guy asks: why should I learn Python? [closed]

Tags:

People also ask

Why should I learn Python instead of Java?

Although Java is faster, Python is more versatile, easier to read, and has a simpler syntax. According to Stack Overflow, this general use, interpreted language is the fourth most popular coding language [1].

Why should I learn Python?

Python is highly versatile. You can use it for both small and complex tasks, and it is used across many different industries — from its more common applications in data science and software engineering to environments like mobile app development, artificial intelligence, and machine learning.

Does it make sense to learn Python?

Learning Python is still worth it. Python is a versatile and in-demand language that is one of the easiest programming languages to learn. You can use Python in almost any field of software development, such as Machine Learning, Data Science, AI, Web Development, and much more.

Which language is better Python or Java?

Python and Java are two of the most popular and robust programming languages. Java is generally faster and more efficient than Python because it is a compiled language. As an interpreted language, Python has simpler, more concise syntax than Java. It can perform the same function as Java in fewer lines of code.


There's a risk that this either comes across as a language-troll or a failure to do a basic Google search; rest assured it's not the former, and hopefully not the latter. Anyway, as a big-corporate Java developer (SE and EE) i'm feeling my skills go a bit stale, and i'm aware that for many years there's been some excitement about Python so it's been on my list of things to look into. I've read the first few chapters of O'Reilly's Learning Python, can hack some code together, and, fine, i'm getting the syntax.

But what i'm missing so far is the why

There are plenty of lists of cool stuff about Python and why you should learn it, e.g.

http://en.wikiversity.org/wiki/Why_learn_Python

or here on SO there's some great discussion, e.g.

https://stackoverflow.com/questions/203862/why-should-i-learn-python

and

https://stackoverflow.com/questions/371966/are-there-any-good-reasons-why-i-should-not-use-python

to pick just a couple, but so far i've not found one that quite hits it. I'm looking for that lightbulb "ah, I see" moment where something useful that's maybe tricky in Java is solved by a few lines of Python, but i'm not quite there yet. E.g., from those links

Everything can not only be done, but it can be done fast. For example a program that takes you weeks in C++ might take you a day in Python.

Great! But what?

Because it is highly expressive, i.e., you will earn higher productivity

Cool, I like higher productivity. But what does that really mean?

If the only tool you have is a hammer, every problem looks like a nail

Sounds like me, i'm well aware i'm hitting everything with my Big Java Hammer. But what exactly is the kind of problem that suits a Python wrench rather than a Java Hammer?

There's lots more free/portable/lots of libraries/powerful etc. justifications, but all of these arguably apply to Java as well. You might quite reasonably respond that it all depends on what I want to do; i'm really looking for maybe another tool in the toolbox for usual development activities, from coding, testing (from unit to integration), through to log/trace parsing and troubleshooting in production. And, ultimately, if it's there i'll probably use it - and, heck, there are a fair few jobs out there that require Python. But to persevere up the learning curve I really need that why.