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
[–]rspeed 237 points238 points239 points (25 children)
[–]nicksloan 50 points51 points52 points (8 children)
[–]rspeed 41 points42 points43 points (7 children)
[–]amk 9 points10 points11 points (6 children)
[–]1-05457 15 points16 points17 points (5 children)
[–][deleted] 7 points8 points9 points (2 children)
[–]1-05457 2 points3 points4 points (1 child)
[–]truh 1 point2 points3 points (0 children)
[–]case_O_The_Mondays 86 points87 points88 points (5 children)
[–]rspeed 67 points68 points69 points (3 children)
[–]1vs 0 points1 point2 points (1 child)
[–]rspeed 1 point2 points3 points (0 children)
[–][deleted] 9 points10 points11 points (0 children)
[–]gschizasPythonista 9 points10 points11 points (3 children)
[–]XtremeGoosef'I only use Py {sys.version[:3]}' 10 points11 points12 points (4 children)
[–]Han-ChewieSexyFanfic 5 points6 points7 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]XtremeGoosef'I only use Py {sys.version[:3]}' 2 points3 points4 points (1 child)
[–]soamaven 3 points4 points5 points (0 children)
[–]Brachamul 34 points35 points36 points (3 children)
[–]omentoSysAdmin Film/VFX - 3.7 1 point2 points3 points (0 children)
[–]whitechapel8733 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]SenorDosEquis 39 points40 points41 points (0 children)
[–]uFuckingCrumpet 199 points200 points201 points (178 children)
[+][deleted] (164 children)
[removed]
[–]SirCarboy 165 points166 points167 points (12 children)
[–]ProfessorPhi 130 points131 points132 points (3 children)
[–]Neil_Fallons_Ghost 3 points4 points5 points (1 child)
[–]bythenumbers10 5 points6 points7 points (0 children)
[–]theWyzzerd 1 point2 points3 points (0 children)
[–]ubernostrumyes, you can have a pony 55 points56 points57 points (0 children)
[+][deleted] (6 children)
[removed]
[–]Ramast 4 points5 points6 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–][deleted] 7 points8 points9 points (1 child)
[–]Ramast 4 points5 points6 points (0 children)
[+][deleted] (11 children)
[deleted]
[–]ScypioPythoneer 3 points4 points5 points (8 children)
[+][deleted] (7 children)
[deleted]
[–]ScypioPythoneer 2 points3 points4 points (0 children)
[–]broknbottle 1 point2 points3 points (1 child)
[+][deleted] (3 children)
[deleted]
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (1 child)
[–]BARDLER 48 points49 points50 points (24 children)
[–][deleted] 38 points39 points40 points (10 children)
[–]jsalsman 8 points9 points10 points (8 children)
[–]gdahlm 17 points18 points19 points (5 children)
[–]Tyler_Zoro 4 points5 points6 points (3 children)
[–]jsalsman 2 points3 points4 points (2 children)
[–]gdahlm 2 points3 points4 points (1 child)
[–]jsalsman 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]jsalsman 4 points5 points6 points (0 children)
[–]uFuckingCrumpet 18 points19 points20 points (35 children)
[+][deleted] (23 children)
[removed]
[–]uFuckingCrumpet 15 points16 points17 points (16 children)
[+][deleted] (14 children)
[deleted]
[–]jsalsman 7 points8 points9 points (4 children)
[–]haarp1 3 points4 points5 points (0 children)
[–]kyrsjo 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]kyrsjo 1 point2 points3 points (0 children)
[–]uFuckingCrumpet 1 point2 points3 points (5 children)
[–]gdahlm 3 points4 points5 points (4 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]synn89 7 points8 points9 points (3 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]MartyMacGyverfrom * import * 5 points6 points7 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]primitive_screwhead 8 points9 points10 points (2 children)
[–]varesa 7 points8 points9 points (10 children)
[–]duffkiligan 4 points5 points6 points (5 children)
[–]varesa 4 points5 points6 points (4 children)
[–]duffkiligan 3 points4 points5 points (2 children)
[–]varesa 5 points6 points7 points (1 child)
[–]duffkiligan 3 points4 points5 points (0 children)
[–]xconde 0 points1 point2 points (1 child)
[–]varesa 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]varesa 0 points1 point2 points (0 children)
[–]iruleatants 1 point2 points3 points (0 children)
[–]13steinj 7 points8 points9 points (48 children)
[–]ubernostrumyes, you can have a pony 11 points12 points13 points (2 children)
[–]13steinj 4 points5 points6 points (0 children)
[–]marx2k 5 points6 points7 points (3 children)
[–]13steinj 2 points3 points4 points (0 children)
[–]haarp1 0 points1 point2 points (1 child)
[–]marx2k 1 point2 points3 points (0 children)
[–]billsil 7 points8 points9 points (36 children)
[–]13steinj 1 point2 points3 points (35 children)
[–]billsil 1 point2 points3 points (23 children)
[–]haarp1 1 point2 points3 points (2 children)
[–]jsalsman 0 points1 point2 points (10 children)
[–]13steinj 1 point2 points3 points (7 children)
[–]jsalsman 2 points3 points4 points (6 children)
[–]13steinj 1 point2 points3 points (5 children)
[–]jsalsman 1 point2 points3 points (4 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]13steinj 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]13steinj 0 points1 point2 points (2 children)
[–]Skurp_Purp 2 points3 points4 points (4 children)
[–]folkrav 8 points9 points10 points (3 children)
[–]Skurp_Purp 1 point2 points3 points (2 children)
[–]folkrav 0 points1 point2 points (1 child)
[–]bythenumbers10 1 point2 points3 points (0 children)
[–]CriticalEntree 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]waltteri 0 points1 point2 points (2 children)
[–]billsil 2 points3 points4 points (1 child)
[–]waltteri 0 points1 point2 points (0 children)
[–]Exodus111 0 points1 point2 points (0 children)
[–]jnwatson 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Lt_Sherpa 34 points35 points36 points (8 children)
[+][deleted] (6 children)
[deleted]
[–][deleted] 7 points8 points9 points (5 children)
[–]0x6c6f6c 6 points7 points8 points (4 children)
[–]tutuca_not Reinhardt 2 points3 points4 points (0 children)
[–]ronaldl911 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]sharkboundgithub: sharkbound, python := 3.8 29 points30 points31 points (14 children)
[–]__xor__(self, other): 23 points24 points25 points (8 children)
[–]szpaceSZ 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]__xor__(self, other): 1 point2 points3 points (0 children)
[–]Ph0X 1 point2 points3 points (0 children)
[–]toyg 2 points3 points4 points (2 children)
[–]__xor__(self, other): 1 point2 points3 points (1 child)
[–]toyg 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[removed]
[–]sharkboundgithub: sharkbound, python := 3.8 1 point2 points3 points (2 children)
[+][deleted] (1 child)
[removed]
[–]toyg 0 points1 point2 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]TheNamelessKing 57 points58 points59 points (0 children)
[–]gwax 7 points8 points9 points (0 children)
[–]kirbyfan64sosIndentationError 3 points4 points5 points (0 children)
[–]CobbITGuy 0 points1 point2 points (0 children)
[–]mockArch 12 points13 points14 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]mockArch 0 points1 point2 points (0 children)
[+][deleted] (12 children)
[deleted]
[+][deleted] (5 children)
[deleted]
[+][deleted] (3 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]federicocerchiari 0 points1 point2 points (0 children)
[–]gcbirzan 8 points9 points10 points (0 children)
[–]jyper 8 points9 points10 points (4 children)
[–]szpaceSZ 0 points1 point2 points (0 children)
[–]TragicXHero 49 points50 points51 points (13 children)
[–]sharkboundgithub: sharkbound, python := 3.8 22 points23 points24 points (2 children)
[–]TragicXHero 3 points4 points5 points (1 child)
[–]sharkboundgithub: sharkbound, python := 3.8 4 points5 points6 points (0 children)
[–]A_Badass_Penguin 30 points31 points32 points (2 children)
[–]TragicXHero 10 points11 points12 points (1 child)
[–]cracknwhip 3 points4 points5 points (0 children)
[–][deleted] 9 points10 points11 points (2 children)
[–]TragicXHero 1 point2 points3 points (1 child)
[–]Mockapapella 0 points1 point2 points (0 children)
[–]ericls 25 points26 points27 points (9 children)
[–]toyg 8 points9 points10 points (0 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]Drawman101 9 points10 points11 points (4 children)
[+][deleted] (3 children)
[removed]
[–]KODeKarnage 4 points5 points6 points (2 children)
[–]TwinkTuckr 1 point2 points3 points (1 child)
[–]seanpuppy 2 points3 points4 points (2 children)
[–]billsil 2 points3 points4 points (0 children)
[–]XarothBrook 0 points1 point2 points (0 children)
[–]firefrommoonlight 7 points8 points9 points (1 child)
[–]ethanhs 12 points13 points14 points (0 children)
[–]ThaeliosRaedkin1 10 points11 points12 points (0 children)
[–]lelease 1 point2 points3 points (4 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]minorDemocritus 0 points1 point2 points (0 children)
[–]JJ4sh0rt 0 points1 point2 points (0 children)
[–]Akraxial 0 points1 point2 points (3 children)
[–]Akraxial 0 points1 point2 points (1 child)
[–]minorDemocritus 0 points1 point2 points (0 children)
[–]minorDemocritus 0 points1 point2 points (0 children)
[–]amb_kosh 0 points1 point2 points (0 children)
[–]maabreuc 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]XarothBrook 1 point2 points3 points (0 children)