A Java guy asks: why should I learn Python?
<p>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.</p>

<p>But what i'm missing so far is the <em>why</em></p>

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

<p><a href="http://en.wikiversity.org/wiki/Why_learn_Python">http://en.wikiversity.org/wiki/Why_learn_Python</a></p>

<p>or here on SO there's some great discussion, e.g.</p>

<p><a href="http://stackoverflow.com/questions/203862/why-should-i-learn-python">Why should I learn Python?</a></p>

<p>and </p>

<p><a href="http://stackoverflow.com/questions/371966/are-there-any-good-reasons-why-i-should-not-use-python">Are there any good reasons why I should not use Python?</a></p>

<p>to pick just a couple, but so far i've not found one that quite hits it. I'm looking for that lightbulb "<em>ah, I see</em>" 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</p>

<blockquote>
  <p>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.</p>
</blockquote>

<p>Great! But <em>what</em>?</p>

<blockquote>
  <p>Because it is highly expressive, i.e., you will earn higher productivity</p>
</blockquote>

<p>Cool, I like higher productivity. But what does that really mean?</p>

<blockquote>
  <p>If the only tool you have is a hammer, every problem looks like a nail</p>
</blockquote>

<p>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? </p>

<p>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 <em>why</em>.</p>
