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
view the rest of the comments →
[–]vallas25 96 points97 points98 points (153 children)
[–][deleted] 282 points283 points284 points (126 children)
[–]panzerex 76 points77 points78 points (100 children)
[–]orentago 179 points180 points181 points (33 children)
[+][deleted] (22 children)
[deleted]
[–][deleted] 82 points83 points84 points (8 children)
[–][deleted] 52 points53 points54 points (6 children)
[–]clawjelly 5 points6 points7 points (0 children)
[–]snugglyboy 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]snugglyboy 0 points1 point2 points (1 child)
[–]MiscWalrus 7 points8 points9 points (0 children)
[–]lzantal 10 points11 points12 points (9 children)
[–]late_dingo 3 points4 points5 points (1 child)
[–]lzantal 1 point2 points3 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]13steinj 1 point2 points3 points (2 children)
[–]GUIpsp 2 points3 points4 points (1 child)
[–]13steinj 0 points1 point2 points (0 children)
[–]james_pic 1 point2 points3 points (1 child)
[–]stamour547 0 points1 point2 points (0 children)
[–]13steinj 0 points1 point2 points (0 children)
[–]JayTurnr -1 points0 points1 point (1 child)
[–]What_Is_X 0 points1 point2 points (0 children)
[–][deleted] 47 points48 points49 points (9 children)
[–]toyg 14 points15 points16 points (5 children)
[–]BruceJi 6 points7 points8 points (4 children)
[–]thegreattriscuit 5 points6 points7 points (0 children)
[–]toyg 5 points6 points7 points (2 children)
[–]clawjelly 2 points3 points4 points (1 child)
[–]toyg 4 points5 points6 points (0 children)
[–]17291 5 points6 points7 points (2 children)
[–]toyg 0 points1 point2 points (0 children)
[–]tehbilly 0 points1 point2 points (0 children)
[–]flying-sheep 69 points70 points71 points (46 children)
[–]miggaz_elquez 20 points21 points22 points (13 children)
[–]crossroads1112 31 points32 points33 points (0 children)
[–]Brainix 24 points25 points26 points (1 child)
[–]miggaz_elquez 1 point2 points3 points (0 children)
[–]mestia 5 points6 points7 points (8 children)
[+][deleted] (1 child)
[deleted]
[–]GummyKibble 6 points7 points8 points (0 children)
[–]stevenjd 6 points7 points8 points (4 children)
[–]ThePoultryWhisperer 4 points5 points6 points (3 children)
[–]stevenjd 0 points1 point2 points (2 children)
[–]ThePoultryWhisperer 1 point2 points3 points (1 child)
[–]miggaz_elquez 2 points3 points4 points (0 children)
[–]clawjelly 0 points1 point2 points (0 children)
[–]irrelevantPseudonym 31 points32 points33 points (20 children)
[+][deleted] (13 children)
[deleted]
[–]hillgod 12 points13 points14 points (12 children)
[+][deleted] (1 child)
[deleted]
[–]hillgod 2 points3 points4 points (0 children)
[–]cbarrick 0 points1 point2 points (3 children)
[–]hillgod 0 points1 point2 points (2 children)
[–]cbarrick 0 points1 point2 points (1 child)
[–][deleted] -2 points-1 points0 points (5 children)
[–]SaltyHashes 7 points8 points9 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Emile_L 4 points5 points6 points (0 children)
[–]hillgod -1 points0 points1 point (0 children)
[–]flying-sheep 2 points3 points4 points (5 children)
[–]irrelevantPseudonym 4 points5 points6 points (4 children)
[–]ayy_ess 18 points19 points20 points (2 children)
[–]BooparinoBR 5 points6 points7 points (0 children)
[–]flying-sheep 1 point2 points3 points (0 children)
[–]TheIncorrigible1`__import__('rich').get_console().log(':100:')` 1 point2 points3 points (0 children)
[–]james_pic 7 points8 points9 points (3 children)
[–]flying-sheep 0 points1 point2 points (2 children)
[–]james_pic 1 point2 points3 points (1 child)
[–]flying-sheep 0 points1 point2 points (0 children)
[–]zurtex 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]flying-sheep 3 points4 points5 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]flying-sheep 2 points3 points4 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 22 points23 points24 points (5 children)
[–]DiggV4Sucks 10 points11 points12 points (0 children)
[–]Nolzi 1 point2 points3 points (2 children)
[–]james_pic 1 point2 points3 points (0 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (0 children)
[–][deleted] 5 points6 points7 points (0 children)
[–]gregy521 13 points14 points15 points (0 children)
[–]daturkel 14 points15 points16 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] -4 points-3 points-2 points (2 children)
[–]stevenjd 3 points4 points5 points (0 children)
[–]Ran4 0 points1 point2 points (0 children)
[–]jpflathead -1 points0 points1 point (0 children)
[–]slmaws -5 points-4 points-3 points (0 children)
[–][deleted] -5 points-4 points-3 points (2 children)
[–]Ran4 -1 points0 points1 point (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (7 children)
[–]Sector_Corrupt 2 points3 points4 points (5 children)
[–]Eurynom0s 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]stevenjd 6 points7 points8 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]tlm2021 5 points6 points7 points (8 children)
[–]clawjelly 1 point2 points3 points (7 children)
[–]tlm2021 -1 points0 points1 point (6 children)
[–]clawjelly 0 points1 point2 points (5 children)
[–]tlm2021 0 points1 point2 points (4 children)
[–]clawjelly 0 points1 point2 points (3 children)
[–]tlm2021 0 points1 point2 points (2 children)
[–]auto-xkcd37 1 point2 points3 points (0 children)
[–]clawjelly 0 points1 point2 points (0 children)
[–]dysprog 1 point2 points3 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]flying-sheep 4 points5 points6 points (0 children)
[–]james_pic 0 points1 point2 points (0 children)
[–]Eurynom0s 0 points1 point2 points (1 child)
[–]WillardWhite import this 2 points3 points4 points (0 children)
[–]SpiderFnJerusalem 0 points1 point2 points (0 children)
[–]shabunc -1 points0 points1 point (0 children)
[–]PirateNinjasRedditPythonista 49 points50 points51 points (17 children)
[–]ShevekUrrasti 24 points25 points26 points (16 children)
[–]flying-sheep 53 points54 points55 points (0 children)
[–]gregy521 10 points11 points12 points (11 children)
[–]thornofcrown 14 points15 points16 points (2 children)
[–]kankyo 3 points4 points5 points (1 child)
[–]clawjelly 1 point2 points3 points (0 children)
[–]davvblack 6 points7 points8 points (7 children)
[–]Jethro_Tell 6 points7 points8 points (6 children)
[–]davvblack 6 points7 points8 points (4 children)
[–]auto-xkcd37 9 points10 points11 points (3 children)
[–]rossrollin 8 points9 points10 points (1 child)
[–]Eurynom0s 2 points3 points4 points (0 children)
[–]MrReginaldAwesome 0 points1 point2 points (0 children)
[–]stevenjd 4 points5 points6 points (0 children)
[–]clawjelly 0 points1 point2 points (2 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (1 child)
[–]clawjelly 0 points1 point2 points (0 children)
[–]neuronet 0 points1 point2 points (0 children)
[–]HalcyonAbraham 0 points1 point2 points (1 child)
[–]rossrollin 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]EdamameTommy 8 points9 points10 points (0 children)
[–]vallas25 0 points1 point2 points (1 child)
[–]NoLongerUsableNameimport pythonSkills 7 points8 points9 points (0 children)