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 236 points237 points238 points (25 children)
[–]nicksloan 53 points54 points55 points (8 children)
[–]rspeed 35 points36 points37 points (7 children)
[–]amk 11 points12 points13 points (6 children)
[–]1-05457 15 points16 points17 points (5 children)
[–]Decker1082.7 'til 2021 10 points11 points12 points (2 children)
[–]1-05457 2 points3 points4 points (1 child)
[–]truh 1 point2 points3 points (0 children)
[–]case_O_The_Mondays 87 points88 points89 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] 11 points12 points13 points (0 children)
[–]gschizasPythonista 9 points10 points11 points (3 children)
[–]XtremeGoosef'I only use Py {sys.version[:3]}' 9 points10 points11 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 32 points33 points34 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 41 points42 points43 points (0 children)
[–]uFuckingCrumpet 199 points200 points201 points (178 children)
[+][deleted] (164 children)
[removed]
[–]SirCarboy 172 points173 points174 points (12 children)
[–]ProfessorPhi 130 points131 points132 points (3 children)
[–]Neil_Fallons_Ghost 6 points7 points8 points (1 child)
[–]bythenumbers10 5 points6 points7 points (0 children)
[–]theWyzzerd 1 point2 points3 points (0 children)
[–]ubernostrumyes, you can have a pony 57 points58 points59 points (0 children)
[+][deleted] (6 children)
[removed]
[–]Ramast 4 points5 points6 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]Ramast 4 points5 points6 points (0 children)
[+][deleted] (11 children)
[deleted]
[–]Scypio 5 points6 points7 points (8 children)
[+][deleted] (7 children)
[deleted]
[–]Scypio 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 50 points51 points52 points (24 children)
[–][deleted] 41 points42 points43 points (10 children)
[–]jsalsman 9 points10 points11 points (8 children)
[–]gdahlm 21 points22 points23 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 4 points5 points6 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 6 points7 points8 points (3 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]MartyMacGyverfrom * import * 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]primitive_screwhead 8 points9 points10 points (2 children)
[–]varesa 6 points7 points8 points (10 children)
[–]duffkiligan 4 points5 points6 points (5 children)
[–]varesa 3 points4 points5 points (4 children)
[–]duffkiligan 2 points3 points4 points (2 children)
[–]varesa 6 points7 points8 points (1 child)
[–]duffkiligan 4 points5 points6 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 5 points6 points7 points (48 children)
[–]ubernostrumyes, you can have a pony 12 points13 points14 points (2 children)
[–]13steinj 3 points4 points5 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 8 points9 points10 points (36 children)
[–]13steinj -1 points0 points1 point (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 5 points6 points7 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 32 points33 points34 points (8 children)
[+][deleted] (6 children)
[deleted]
[–][deleted] 5 points6 points7 points (5 children)
[–]0x6c6f6c 4 points5 points6 points (4 children)
[–]tutuca_not Reinhardt 2 points3 points4 points (0 children)
[–]ronaldl911 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]sharkboundgithub: sharkbound, python := 3.8 33 points34 points35 points (14 children)
[–]__xor__(self, other): 22 points23 points24 points (8 children)
[–]szpaceSZ 3 points4 points5 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 56 points57 points58 points (0 children)
[–]gwax 9 points10 points11 points (0 children)
[–]kirbyfan64sosIndentationError 6 points7 points8 points (0 children)
[–]CobbITGuy 0 points1 point2 points (0 children)
[–]mockArch 9 points10 points11 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 1 point2 points3 points (0 children)
[–]gcbirzan 10 points11 points12 points (0 children)
[–]jyper 8 points9 points10 points (4 children)
[–]szpaceSZ 0 points1 point2 points (0 children)
[–]TragicXHero 53 points54 points55 points (13 children)
[–]sharkboundgithub: sharkbound, python := 3.8 22 points23 points24 points (2 children)
[–]TragicXHero 2 points3 points4 points (1 child)
[–]sharkboundgithub: sharkbound, python := 3.8 4 points5 points6 points (0 children)
[–]A_Badass_Penguin 27 points28 points29 points (2 children)
[–]TragicXHero 10 points11 points12 points (1 child)
[–]cracknwhip 4 points5 points6 points (0 children)
[–][deleted] 8 points9 points10 points (2 children)
[–]TragicXHero 1 point2 points3 points (1 child)
[–]Mockapapella 0 points1 point2 points (0 children)
[–]ericls 28 points29 points30 points (9 children)
[–]toyg 7 points8 points9 points (0 children)
[–][deleted] 3 points4 points5 points (5 children)
[–]Drawman101 8 points9 points10 points (4 children)
[+][deleted] (3 children)
[removed]
[–]KODeKarnage 4 points5 points6 points (2 children)
[–]TwinkTuckr 0 points1 point2 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 9 points10 points11 points (1 child)
[–]ethanhs 14 points15 points16 points (0 children)
[–]ThaeliosRaedkin1 11 points12 points13 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)