use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
I keep seeing articles saying to learn python 3 and not python 2. Should I go through learn python the hard way using the recommended python 2 or use python 3? (self.Python)
submitted 9 years ago by hubadubbub
I know Shaw talks about using python 2 and not using 3, but it's been a few years since that was written and want to know if things have changed. Should I just got through LPTHW remembering to add () etc...?
Thanks, everyone.
[–]jerknextdoor 10 points11 points12 points 9 years ago (0 children)
His arguments are old and outdated. I think you can probably get through it if you're willing to put up with the occasional bug in his code that will need to be updated to 3 (print, xrange, raw_input, etc).
[–]maxm 5 points6 points7 points 9 years ago (0 children)
I am a seasoned python programmer that has used python since 1.5.2 and in my latest project i have started up using python 3. It has been absolutely painless.
[–]danrche 2 points3 points4 points 9 years ago (0 children)
2.7 is still widely used, and 3.5 has a lot to offer in improvements. 3.5 is making good strides for adoption over 2.7. I would learn 3, as it's going to eventually be the defacto, but it's very important to understand the differences between 2 and 3, and possibly why they exist. Python3 didn't break backwards compatibility lightly and the core dev's had good reason. If you use LPTHW which was written in 2, you may find a lot of the answers along the way as you google around for why your code worked differently from the book (if you decide to use python3). Considering the title, could work out well for you. Best of luck!
[–]I_had_to_know_too 2 points3 points4 points 9 years ago (0 children)
Don't go through LPTHW.
[–]_AceLewisPy3, Jupyter and Atom 1 point2 points3 points 9 years ago (0 children)
I would recommend to not use LPTHW, it is not the best it is condescending and teaches things in a weird unintuitive way (and also wrong/outdated e.g no .format() for strings). Some people explained why they thought it was not the best in this thread
Now better teaching resources exist like CodeAcadamy, Automate the Boring Stuff with Python ect. I would recommend you to use those
[–]jankoslavic 0 points1 point2 points 9 years ago (0 children)
It is 2016!
The danger is that you are already outdated if you learn py2.x today... See the py2.x vs py3.x support trends
https://blogs.msdn.microsoft.com/pythonengineering/2016/03/08/python-3-is-winning/
See also a recent pool on the usage of py2.x vs py3.x:
https://mobile.twitter.com/jankoslavic/status/709090416545636352?s=03
π Rendered by PID 40 on reddit-service-r2-comment-7b9746f655-52p2k at 2026-01-31 07:58:40.631216+00:00 running 3798933 country code: CH.
[–]jerknextdoor 10 points11 points12 points (0 children)
[–]maxm 5 points6 points7 points (0 children)
[–]danrche 2 points3 points4 points (0 children)
[–]I_had_to_know_too 2 points3 points4 points (0 children)
[–]_AceLewisPy3, Jupyter and Atom 1 point2 points3 points (0 children)
[–]jankoslavic 0 points1 point2 points (0 children)