FAQ
Here's a pretty incomplete list of a lot of questions I get asked a lot. I mean a lot. This first one, I must have answered like 400 times.
Q: Python2 or Python3?
Well, it depends on who's asking. Are you just starting out? Never programmed before in your life? Then it doesn't strictly matter. Most of the material you'll see online will be for Python2 and may be very slightly incompatible with Python3. For that reason, you might want to stay with Python2.
Are you a seasoned programmer who wants to learn something new? Go for Python3, it's the responsible thing to do. We're trying to sunset Python2. It'll be some years yet, but do us all a solid and don't build yet another thing that causes migration headaches down the line.
Q: Why would I use python?
Over any other sort of snake? They're less poisonous than rattlers, for one.
But over another language? Well, that's a complex question. First, we should be answer another question, "Why would I use any language in particular over another?"
Here's an analogy. Shoes are shoes, right? They cover your feet, keep them warm, they're basically fungible. So why would I wear a fancy dress shoe over a hiking boot over a trail running shoe? Well, each has its strengths, even if the strength is just, "the security guard won't give you side-eye as you try to make your way into the gala."
But more specifically, it's about expressiveness. We see this in spoken language as well. There's this idea, linguistic relativity, that the structure of the language you speak influences how you conceptualize your world. The example bandied about (which turns out to mostly be urban legend) is that Eskimo cultures spend a lot of time in snow and thus have a good 50+ different words for describing it.
Whether or not that's true, the concept still holds to a degree. Being from a tropical island, I have one word to describe snow: snow. Hanging out with a bunch of folks who snowboard and ski, though, I hear terms like 'slushy', 'crunchy', uhh... 'squishy'. I may have made up that last one. In any case, their specific dialect of the language is much more expressive with things they're concerned about.
Going back to programming languages, intentional or not, they have strengths and weaknesses, usually built into them by their designers, influenced by whatever their concerns were. C was driven by an overwhelming desire to build a language easier than directly writing assembly, but only just barely. It excels at systems-level things, writing operating systems and game engines and other things built for speed.
Perl was designed to make report extraction easier and does a fine job of doing so. It also appears to be designed to be impossible to read. It also excels in that respect. Ruby prizes flexibility, Java... does its Java thing. The list goes on and on, the quirks of each language dictated by the quirks of their designers.
Now, curiously, Python does not excel in almost any area. It's not as fast as C, or as flexible or as expressive as Ruby, nor does it have the metaprogramming facilities of lisp. At best, it holds second place in all those areas. What makes Python so interesting is that it holds second place in so many areas.
Almost anywhere you would use any other language, you could use Python. And you might suffer a little bit for doing so, but only a little bit. For your trouble, you'd be armed with a language that works well enough to write a systems debugger, a web server, a ticketing system, do scientific computing, etc. This list, the list of things for which Python is suitable, or even desirable, this list is very long. That is python's strength.
Q: No seriously, why python?
FINE. Honestly, I think it has to do with the syntax. It's not punishingly difficult, but it's punishing if you try to do anything exceptionally clever. Almost everything written with python is... utilitarian. There's very little in the way of elegance, but by the same virtue, nothing can be made impossibly complicated. This universal ease makes it a great language that can be shared between developers of highly variable skill levels.