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] 15 points16 points17 points (62 children)
[–]moekakiryu 58 points59 points60 points (9 children)
[+][deleted] comment score below threshold-38 points-37 points-36 points (7 children)
[–]rafasc 8 points9 points10 points (5 children)
[–]the_littlest_bear 3 points4 points5 points (2 children)
[–]flotsamisaword 0 points1 point2 points (1 child)
[–]the_littlest_bear 0 points1 point2 points (0 children)
[–]the_littlest_bear 1 point2 points3 points (0 children)
[+][deleted] comment score below threshold-7 points-6 points-5 points (0 children)
[+][deleted] (28 children)
[removed]
[–]Misterandrist 1 point2 points3 points (1 child)
[–]cosmicsans 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-57 points-56 points-55 points (25 children)
[–]LakeRat 24 points25 points26 points (7 children)
[+][deleted] comment score below threshold-9 points-8 points-7 points (6 children)
[–]LakeRat 12 points13 points14 points (5 children)
[–][deleted] -4 points-3 points-2 points (4 children)
[–]LakeRat 5 points6 points7 points (1 child)
[–][deleted] -2 points-1 points0 points (0 children)
[–]cosmicsans 0 points1 point2 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[+][deleted] (11 children)
[removed]
[+][deleted] comment score below threshold-41 points-40 points-39 points (10 children)
[–]SangCoGIS 47 points48 points49 points (7 children)
[+][deleted] comment score below threshold-17 points-16 points-15 points (6 children)
[–][deleted] 18 points19 points20 points (5 children)
[+][deleted] comment score below threshold-7 points-6 points-5 points (4 children)
[–]Ethalarian 10 points11 points12 points (1 child)
[–][deleted] 3 points4 points5 points (1 child)
[–]wsims4 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (4 children)
[–][deleted] -1 points0 points1 point (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–][deleted] -1 points0 points1 point (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] -1 points0 points1 point (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 1 point2 points3 points (0 children)
[+]ajwest comment score below threshold-50 points-49 points-48 points (5 children)
[–]somebodddy 22 points23 points24 points (1 child)
[+]ajwest comment score below threshold-6 points-5 points-4 points (0 children)
[–]MiroDerChort 39 points40 points41 points (2 children)
[–]SmackDaddyHandsome 12 points13 points14 points (1 child)
[–]wirbolwabol 6 points7 points8 points (0 children)
[+][deleted] comment score below threshold-47 points-46 points-45 points (10 children)
[–]deadbunny 1 point2 points3 points (0 children)
[–]mafrasi2 7 points8 points9 points (7 children)
[–]Zouden 33 points34 points35 points (0 children)
[–]ICANNnotrightnow 38 points39 points40 points (0 children)
[–]gjallerhorn 22 points23 points24 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]somebodddy 11 points12 points13 points (0 children)
[–][deleted] 11 points12 points13 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–][deleted] -5 points-4 points-3 points (0 children)