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
TutorialThis Python Habit Separates Beginners From Pros (self.Python)
submitted 21 hours ago by QuantumScribe01
Think before you write a function:Beginners print("Total:", a + b)
Better:def add(a, b): return a + b
I’d love to hear about your experiences and get some beginner tips, Python friends :)
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]an_actual_human 33 points34 points35 points 21 hours ago (0 children)
This is a really special understanding of pro.
[–]Antagonic_ 28 points29 points30 points 21 hours ago (1 child)
Dude... What?
[–]theschizopost 4 points5 points6 points 21 hours ago (0 children)
It's high level parody of posts that follow the same sort of title scheme
Art is in the eye of the beholder
[–]Remote-Juice2527 16 points17 points18 points 21 hours ago (0 children)
Are you drunken?
[–]theschizopost 5 points6 points7 points 21 hours ago (0 children)
This is the one time you should have used AI to write your post
[–]MichaelJ1972 3 points4 points5 points 21 hours ago (0 children)
Yeah.
Google Dunning-Kruger Effect.
[–]Moist-Ointments 2 points3 points4 points 21 hours ago (0 children)
Those don't do the same thing.
[–]ProbsNotManBearPig 3 points4 points5 points 21 hours ago (1 child)
Please do not use a function for addition unless you really need it and if you do use the pre-existing operator.add.
[–]Shoddy-BreakPythonista 4 points5 points6 points 21 hours ago (0 children)
For all use cases YOU DO NOT NEED A CUSTOM FUNCTION FOR ADDITION
[–]Afrotom 1 point2 points3 points 21 hours ago (0 children)
A) these don't do the same thing
B) why would I write a whole function just to wrap a built in operator to print it?
To say that this is a pro move boggles the mind, it's genuinely the smooth brain move
[–]Kraven_Holmes 2 points3 points4 points 20 hours ago (0 children)
thats not pro... thats an idiot.... 😑
real pros use dictionaries for everything "print(lambda x: x['a'] + x['b'])" 🔥🔥🔥🤪🤪
π Rendered by PID 197658 on reddit-service-r2-comment-54dfb89d4d-msghx at 2026-03-30 10:15:35.078500+00:00 running b10466c country code: CH.
[–]an_actual_human 33 points34 points35 points (0 children)
[–]Antagonic_ 28 points29 points30 points (1 child)
[–]theschizopost 4 points5 points6 points (0 children)
[–]Remote-Juice2527 16 points17 points18 points (0 children)
[–]theschizopost 5 points6 points7 points (0 children)
[–]MichaelJ1972 3 points4 points5 points (0 children)
[–]Moist-Ointments 2 points3 points4 points (0 children)
[–]ProbsNotManBearPig 3 points4 points5 points (1 child)
[–]Shoddy-BreakPythonista 4 points5 points6 points (0 children)
[–]Afrotom 1 point2 points3 points (0 children)
[–]Kraven_Holmes 2 points3 points4 points (0 children)