
Ask HN: Should I learn Python 3 or Python 2? - webbrahmin
I plan to explore data science and machine learning. After looking into some MOOCs and other online learning resources I have come to the conclusion that a firm grasp of Python is essential. I am new to Python, so my question is should I learn Python 2 or Python 3?<p>Edit: Corrected a typo.
======
__warlord__
Python 3 for sure. Even if some major libraries are not yet supported is just
a matter of time for them to be 3 compatible. And on top of that, you get a
lot of goodies in python 3 specially around string manipulation and
dictionaries. Take a look at this [0] post from the python community about
python 3 vs 2.

0\.
[https://wiki.python.org/moin/Python2orPython3](https://wiki.python.org/moin/Python2orPython3)

------
viraptor
Learn? 3, but really both - apart from string encoding, there are almost only
small syntax differences. Nothing that would make you go "I don't know what it
does, I don't know python 2".

Use? 3 if possible, unless some super important library is not updated. 2 is
going away at some point. Let it die.

------
brudgers
There aren't any differences important enough to worry about at the "I am
learning Python" level. Down the road, problems between one and the other will
get resolved by Googling into StackOverflow, blogs, and the Python
documentation. Googling to resolve problems is part of learning Python...and
every other programming language these days. Hence Googling for answers is
part of learning to program.

Good luck.

------
kgraves
3\. All the libraries we all know and love are moving there, even Guido the
Python BDFL killed 2.7 off himself[0] with a definitive EOL date of
01/01/2020\. Learn 3.

[0] [https://mail.python.org/pipermail/python-
dev/2018-March/1523...](https://mail.python.org/pipermail/python-
dev/2018-March/152348.html)

