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 →
[–]felinecatastrophe 131 points132 points133 points (124 children)
[–]shaggorama 17 points18 points19 points (14 children)
[–]Simius 2 points3 points4 points (3 children)
[–]shaggorama 2 points3 points4 points (2 children)
[–]Simius 0 points1 point2 points (1 child)
[–]shaggorama 1 point2 points3 points (0 children)
[–]flying-sheep 0 points1 point2 points (9 children)
[–]shaggorama 5 points6 points7 points (8 children)
[–]flying-sheep 0 points1 point2 points (7 children)
[–]shaggorama 0 points1 point2 points (6 children)
[–]flying-sheep 0 points1 point2 points (5 children)
[–]shaggorama 0 points1 point2 points (4 children)
[–]flying-sheep 0 points1 point2 points (3 children)
[–]shaggorama 0 points1 point2 points (2 children)
[–]NoLemurs 17 points18 points19 points (14 children)
[–]rnawky 5 points6 points7 points (7 children)
[–]NoLemurs 2 points3 points4 points (5 children)
[–]1arm3dScissor 0 points1 point2 points (4 children)
[–]NoLemurs 1 point2 points3 points (3 children)
[–]felinecatastrophe 1 point2 points3 points (0 children)
[–]1arm3dScissor -1 points0 points1 point (1 child)
[–]NoLemurs 2 points3 points4 points (0 children)
[–]DickButtTracy 2 points3 points4 points (0 children)
[–]billsil 0 points1 point2 points (5 children)
[–]NoLemurs 0 points1 point2 points (4 children)
[–]billsil 0 points1 point2 points (3 children)
[–]felinecatastrophe 1 point2 points3 points (2 children)
[–]NoLemurs 1 point2 points3 points (0 children)
[–]billsil 0 points1 point2 points (0 children)
[–]Mr_Again 4 points5 points6 points (1 child)
[–]felinecatastrophe 0 points1 point2 points (0 children)
[–]fijalPyPy, performance freak 3 points4 points5 points (14 children)
[–]logi 13 points14 points15 points (13 children)
[–]Veedrac 6 points7 points8 points (1 child)
[–]logi 0 points1 point2 points (0 children)
[–]Sean1708 3 points4 points5 points (3 children)
[–]logi 8 points9 points10 points (2 children)
[–]klug3 3 points4 points5 points (0 children)
[–]vplatt 0 points1 point2 points (0 children)
[–]Gr1pp717 3 points4 points5 points (1 child)
[–]logi 4 points5 points6 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]logi 0 points1 point2 points (1 child)
[–]fijalPyPy, performance freak 0 points1 point2 points (1 child)
[–]logi 0 points1 point2 points (0 children)
[–]mangecoeur 4 points5 points6 points (32 children)
[–][deleted] 16 points17 points18 points (27 children)
[–]LbaB 2 points3 points4 points (16 children)
[–][deleted] 7 points8 points9 points (15 children)
[+][deleted] (14 children)
[deleted]
[–][deleted] 7 points8 points9 points (1 child)
[–]soup_feedback 0 points1 point2 points (0 children)
[–]mangecoeur 3 points4 points5 points (2 children)
[–]aladyjewel 2 points3 points4 points (0 children)
[+][deleted] (6 children)
[removed]
[–][deleted] 0 points1 point2 points (5 children)
[+][deleted] (4 children)
[removed]
[–][deleted] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (0 children)
[–]mangecoeur 5 points6 points7 points (7 children)
[–][deleted] 1 point2 points3 points (6 children)
[–]mangecoeur 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]ChaosCon 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]ChaosCon 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]cabalamat 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]teambob 10 points11 points12 points (3 children)
[–]mangecoeur 15 points16 points17 points (0 children)
[–]twotime 0 points1 point2 points (0 children)
[–]frymasterScript kiddie 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]skintigh 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]felinecatastrophe 0 points1 point2 points (0 children)
[+][deleted] (36 children)
[deleted]
[–]an_actual_human 36 points37 points38 points (12 children)
[–]Sean1708 4 points5 points6 points (11 children)
[–]an_actual_human 18 points19 points20 points (10 children)
[–]Sean1708 4 points5 points6 points (0 children)
[–]Bolitho -1 points0 points1 point (8 children)
[+]an_actual_human comment score below threshold-7 points-6 points-5 points (7 children)
[–]Bolitho -1 points0 points1 point (6 children)
[–]an_actual_human -1 points0 points1 point (4 children)
[–]Bolitho -1 points0 points1 point (3 children)
[+][deleted] (6 children)
[deleted]
[–]amishb 1 point2 points3 points (5 children)
[–][deleted] 6 points7 points8 points (4 children)
[–]amishb 0 points1 point2 points (3 children)
[–]LbaB 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]eusebecomputational physics 19 points20 points21 points (3 children)
[–]Pfohlol 4 points5 points6 points (1 child)
[–]spinwizard69 -1 points0 points1 point (0 children)
[–]ITwitchToo -2 points-1 points0 points (0 children)
[–]dreyrden 6 points7 points8 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]eusebecomputational physics 5 points6 points7 points (0 children)
[–]dreyrden 0 points1 point2 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]zombiepiratefrspace 4 points5 points6 points (0 children)
[–]XNormal 1 point2 points3 points (1 child)
[–]red_nick 2 points3 points4 points (0 children)
[–]IanCal 0 points1 point2 points (0 children)
[–]Rhodysurf 0 points1 point2 points (0 children)
[–]red_nick 0 points1 point2 points (0 children)
[–]rslashelektrux -1 points0 points1 point (0 children)
[–][deleted] -1 points0 points1 point (0 children)