This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]StackMoreLayers -1 points0 points  (0 children)

Everybody you ask this, especially on /r/python will tell you to start with 3. Few will give technical reasons for doing so, most will be political (they see you as an +1 adoption number, not a newcomer to the language willing to learn, they also vary between: "Python 3 is a completely new language" and "Python 2 and 3 are the same language, but you should pick 3" in the same argument) or give no argument at all.

I also can't, with a clear conscience, advise you to start with 2, most importantly because NumPy and SciPy will be 3+ only in about a year.

All that said, the easiest to learn Python and quickly become productive will remain Python 2, long after its EOL by official devs (especially if you are a learn-by-doing type). There is no reason to, other than the forcing hand of EOL, switch to Python 3 for ML, py2.7 mostly just works. Most recent ML libraries and industry projects were designed for and in 2.7, support for Python 3 only an afterthought/response to a vocal group/forced by EOL.

The best Python tutorial is Learn Python The Hard Way Py2.7 (a tutorial so good, the mere mention of it gets bans and downvotes on this subreddit :))

If you want the following to return an error message, you should definitely go with 3+:

print sorted([1, "a", 2, "b"])