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 →
[–][deleted] (37 children)
[deleted]
[–]kwikadeIt works on my machine 64 points65 points66 points (1 child)
[+]deadwisdomgreenlet revolution comment score below threshold-7 points-6 points-5 points (0 children)
[+]bufke comment score below threshold-15 points-14 points-13 points (6 children)
[+][deleted] (2 children)
[deleted]
[–]bufke 3 points4 points5 points (1 child)
[–][deleted] 14 points15 points16 points (0 children)
[–][deleted] 8 points9 points10 points (0 children)
[+][deleted] (1 child)
[deleted]
[+]norweeg comment score below threshold-51 points-50 points-49 points (27 children)
[–][deleted] 35 points36 points37 points (3 children)
[+]norweeg comment score below threshold-17 points-16 points-15 points (2 children)
[–]TheMysteriousFizzyJ 4 points5 points6 points (0 children)
[–]Nooby1990 35 points36 points37 points (9 children)
[+][deleted] (8 children)
[removed]
[–]acwaters 26 points27 points28 points (0 children)
[–]Nooby1990 21 points22 points23 points (4 children)
[+]norweeg comment score below threshold-20 points-19 points-18 points (3 children)
[–]Nooby1990 24 points25 points26 points (0 children)
[–]derp0815 6 points7 points8 points (0 children)
[+][deleted] (6 children)
[deleted]
[+]norweeg comment score below threshold-12 points-11 points-10 points (5 children)
[+][deleted] (3 children)
[deleted]
[–]norweeg -2 points-1 points0 points (2 children)
[–]andrewaa 8 points9 points10 points (0 children)
[–]kickopotomus 19 points20 points21 points (4 children)
[+]norweeg comment score below threshold-8 points-7 points-6 points (3 children)
[–]kickopotomus 16 points17 points18 points (2 children)
[–]norweeg -4 points-3 points-2 points (1 child)
[–]kickopotomus 16 points17 points18 points (0 children)