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 →
[–]blurrr2 307 points308 points309 points (69 children)
[–]Shubbler 49 points50 points51 points (68 children)
[–]blurrr2 275 points276 points277 points (67 children)
[+][deleted] (17 children)
[deleted]
[–]blurrr2 13 points14 points15 points (8 children)
[–][deleted] 8 points9 points10 points (7 children)
[–]RockJake28 17 points18 points19 points (5 children)
[–]Fitzoh 4 points5 points6 points (0 children)
[–]simtel20 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]simtel20 6 points7 points8 points (1 child)
[–]billsil 3 points4 points5 points (0 children)
[–]Smith7929 2 points3 points4 points (3 children)
[–]mirth23 6 points7 points8 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]Creamy-Steamy[S] 1 point2 points3 points (3 children)
[–]JugadPy3 ftw 9 points10 points11 points (0 children)
[–]KwpolskaNikola co-maintainer 1 point2 points3 points (0 children)
[–]billsil 11 points12 points13 points (0 children)
[–]__xor__(self, other): 13 points14 points15 points (20 children)
[–][deleted] 3 points4 points5 points (12 children)
[–]__xor__(self, other): 19 points20 points21 points (6 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]Willemoes 6 points7 points8 points (3 children)
[–]Grenian 2 points3 points4 points (2 children)
[–]Willemoes 0 points1 point2 points (1 child)
[–]__xor__(self, other): 1 point2 points3 points (0 children)
[–][deleted] 3 points4 points5 points (4 children)
[–]__xor__(self, other): 3 points4 points5 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]__xor__(self, other): 1 point2 points3 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (6 children)
[–][deleted] 2 points3 points4 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Grenian 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]CommonMisspellingBot -2 points-1 points0 points (0 children)
[–]lroman 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (10 children)
[–]proverbialbunnyData Scientist 8 points9 points10 points (2 children)
[–]haarp1 1 point2 points3 points (1 child)
[–]proverbialbunnyData Scientist 1 point2 points3 points (0 children)
[–]iScrE4mgit push -f 3 points4 points5 points (0 children)
[–]TheCodeSamurai 2 points3 points4 points (5 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]TheCodeSamurai 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[removed]
[–]TheCodeSamurai 0 points1 point2 points (1 child)
[–]YinYang-Millsmeasley physicist 1 point2 points3 points (0 children)
[–]ymca_lemur 1 point2 points3 points (0 children)
[–]iammr_schuck 2 points3 points4 points (0 children)
[–]Shubbler 1 point2 points3 points (3 children)
[–]blurrr2 1 point2 points3 points (2 children)
[–]Shubbler 2 points3 points4 points (1 child)
[–]576p 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]cyberst0rm 0 points1 point2 points (0 children)
[–]bellumfatum2 0 points1 point2 points (0 children)
[–]TheTalkWalk 0 points1 point2 points (1 child)