Ask HN:What are the best online resources to learn Python?

8 points by Rezal ↗ HN
I am starting to learn python and there are a ton of resources. I kind a got overwhelmed with all the available sources. What are the best ones according to you?

16 comments

[ 0.23 ms ] story [ 39.7 ms ] thread
In my opinion the best place to start is the tutorial on python.org, for whichever version of python (2 or 3) you are learning.

Python 2: https://docs.python.org/2/tutorial/index.html

Python 3: https://docs.python.org/3/tutorial/index.html

Also start browsing through the modules listing, so that you don't reinvent too many wheels:

Python 2: https://docs.python.org/2/py-modindex.html

Python 3: https://docs.python.org/3/py-modindex.html

And the answer to whether you should learn 2 or 3 is:

2, because there are still 3rd party tools that don't support 3. Or because your friends are using 2.

Unless you know you need 3.

Or if all your friends are using 3 (because that's where a lot of your help is going to come from).

https://wiki.python.org/moin/Python2orPython3

But it doesn't matter overly much. Unless it does, for your job, but then they'll tell you.

thanks @a3n. this is really helpful
Learn by example with Real Python - http://realpython.com

(I am the co-founder)

@mjhea0 thanks. That's interesting. Will definitely take a look at it.
Two words: "Python Koans".

Basically, these are coding exercises (floating about in various forked versions) that do a pretty good job at testing your working knowledge of core syntax (much better than staring at online tutorials, anyway). Including, importantly, a lot of the fussy stuff you don't think you need to be familiar with, but actually, you do (and would probably neglect entirely if you tried to sharpen your skills just by working on personal projects, thinking in terms of the idioms of whatever language you were most recently working with).

Just find a good weekend, roll up your sleeves, and push yourself through them. No one will be able to kick sand in your face in an interview or a phone screen ("What? You don't know about named tuples?") ever again.

Thanks @dreamweapon. I like the hands on approach.