Python 3 and the latest versions of Python 2 are
mostly the same. Where they differ can cause quite a bit of frustration to you, however.
Ben-oni wrote:Can't answer that unless we know: Why Python?
This is somewhat true. If you need to use Python today for work or school: learn Python 2.7; you will need to support/troubleshoot many, many Python 2 programs while working for any company that uses Python. Many enviroments don't support Python 3 yet, so you'll be developing in Python 2.7 (or lower) anyways.
I would just learn Python 2. Python 3 isn't that much different, it's documentation is less mature, and when everyone does eventually switch over to Python 3 you won't be the only person with a few problems. The Python 2 to 3 tool fixes most minor stuff anyways, and leaves you with a few nasty suprises to troubleshoot, but any problem has almost certainly been solved on StackOverflow.
Gah, I was so confused the very first time I was running Python3 and
- Code: Select all
print foo
didn't work. You have to use
- Code: Select all
print(foo)
now.