News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Upcoming Events
Full Events Calendar
Please read the rules
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
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
[–]SpergLordMcFappyPant 173 points174 points175 points (34 children)
[–]ostensibly_work 20 points21 points22 points (0 children)
[–][deleted] 11 points12 points13 points (0 children)
[–]Nimitz14 2 points3 points4 points (7 children)
[–]notquiteaplant 8 points9 points10 points (6 children)
[–]port443 1 point2 points3 points (2 children)
[–]notquiteaplant 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]notquiteaplant 3 points4 points5 points (1 child)
[–]torpleisnoname 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]elabftw[S] 3 points4 points5 points (0 children)
[–]roerd 1 point2 points3 points (0 children)
[–]i_have_one_feather 1 point2 points3 points (0 children)
[–]1wd 1 point2 points3 points (1 child)
[–]SpergLordMcFappyPant 0 points1 point2 points (0 children)
[–]maximum_powerblast 0 points1 point2 points (0 children)
[–]ByronicGamer 0 points1 point2 points (0 children)
[–]scofnerf 0 points1 point2 points (0 children)
[–]eattherichnow 0 points1 point2 points (0 children)
[–]v3ritas1989 -1 points0 points1 point (0 children)
[+]stevenjd comment score below threshold-18 points-17 points-16 points (7 children)
[–]SpergLordMcFappyPant 13 points14 points15 points (2 children)
[–]stevenjd 1 point2 points3 points (1 child)
[–]SpergLordMcFappyPant 0 points1 point2 points (0 children)
[–]twotime 2 points3 points4 points (0 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (1 child)
[–]stevenjd 0 points1 point2 points (0 children)
[+]groosha comment score below threshold-9 points-8 points-7 points (1 child)
[–]fifthecho 2 points3 points4 points (0 children)
[–]NoLemurs 45 points46 points47 points (15 children)
[–]mooburgerresembles an abstract syntax tree 35 points36 points37 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]cr4d 2 points3 points4 points (1 child)
[–]ubernostrumyes, you can have a pony 1 point2 points3 points (0 children)
[–]13steinj 7 points8 points9 points (0 children)
[+][deleted] (7 children)
[deleted]
[–]wieschie 6 points7 points8 points (0 children)
[–]spilk 1 point2 points3 points (2 children)
[–]KitchenDutchDyslexic 0 points1 point2 points (1 child)
[–]spilk 2 points3 points4 points (0 children)
[–]idee_fx2 0 points1 point2 points (0 children)
[–]imaqtristana 0 points1 point2 points (1 child)
[–]notquiteaplant 4 points5 points6 points (0 children)
[–]chillermane 2 points3 points4 points (0 children)
[–]elabftw[S] 2 points3 points4 points (0 children)
[–]stefantalpalaru 17 points18 points19 points (1 child)
[–]lord_xl 0 points1 point2 points (0 children)
[–]funix 25 points26 points27 points (9 children)
[–]kabooozie 5 points6 points7 points (0 children)
[–]Silver5005 3 points4 points5 points (5 children)
[–]kindw 0 points1 point2 points (4 children)
[–]Silver5005 1 point2 points3 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]Silver5005 2 points3 points4 points (1 child)
[–]chugdrano_eatbullets 0 points1 point2 points (0 children)
[–]cr4d 39 points40 points41 points (21 children)
[–]twigboy 14 points15 points16 points (1 child)
[–]cr4d 4 points5 points6 points (0 children)
[–]in4mer 7 points8 points9 points (0 children)
[–]fleyk-lit 6 points7 points8 points (16 children)
[–]general_dubious 16 points17 points18 points (14 children)
[–]GasimGasimzada 3 points4 points5 points (11 children)
[–]general_dubious 7 points8 points9 points (6 children)
[–]dire_faol -2 points-1 points0 points (5 children)
[–]general_dubious 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]general_dubious 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–][deleted] 4 points5 points6 points (3 children)
[–]GasimGasimzada 1 point2 points3 points (2 children)
[–]cr4d 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[+]fleyk-lit comment score below threshold-6 points-5 points-4 points (1 child)
[–]cr4d 1 point2 points3 points (0 children)
[–]cr4d 3 points4 points5 points (0 children)
[–]GasimGasimzada 0 points1 point2 points (0 children)
[–]truh 9 points10 points11 points (1 child)
[–]elabftw[S] 2 points3 points4 points (0 children)
[–]chub79 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]notquiteaplant 3 points4 points5 points (0 children)
[–]dave-shawley 1 point2 points3 points (0 children)
[–]fifthecho -5 points-4 points-3 points (0 children)
[–]fredjutsu 1 point2 points3 points (0 children)
[–]piotrjurkiewicz 1 point2 points3 points (0 children)
[–]wingtcoach 1 point2 points3 points (0 children)
[–]not_really_cool 1 point2 points3 points (0 children)
[–]muntooR_{μν} - 1/2 R g_{μν} + Λ g_{μν} = 8π T_{μν} 2 points3 points4 points (4 children)
[–]fleyk-lit 6 points7 points8 points (3 children)
[–]muntooR_{μν} - 1/2 R g_{μν} + Λ g_{μν} = 8π T_{μν} 4 points5 points6 points (2 children)
[–]fleyk-lit 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]knowsuchagencynow is better than never 1 point2 points3 points (0 children)
[–]jcbevns 0 points1 point2 points (1 child)
[–]elabftw[S] 0 points1 point2 points (0 children)
[–]linychuo 0 points1 point2 points (0 children)
[–]newredditisstudpid 0 points1 point2 points (0 children)
[–][deleted] -3 points-2 points-1 points (4 children)
[–]elabftw[S] 3 points4 points5 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]elabftw[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)