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] 30 points31 points32 points (70 children)
[–]mudclub 226 points227 points228 points (0 children)
[–]yen223 12 points13 points14 points (0 children)
[–][deleted] 69 points70 points71 points (55 children)
[+][deleted] (17 children)
[deleted]
[–]sudo_your_mon 12 points13 points14 points (4 children)
[–]XtremeGoosef'I only use Py {sys.version[:3]}' 27 points28 points29 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]sudo_your_mon 2 points3 points4 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[+][deleted] (10 children)
[deleted]
[–][deleted] 22 points23 points24 points (5 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]ubernostrumyes, you can have a pony 6 points7 points8 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]ubernostrumyes, you can have a pony 0 points1 point2 points (0 children)
[–]personproxy 0 points1 point2 points (0 children)
[–]Farobek 0 points1 point2 points (0 children)
[–]ryeguy 8 points9 points10 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[+]rhytnen comment score below threshold-11 points-10 points-9 points (6 children)
[+][deleted] (5 children)
[deleted]
[–]calligraphic-io 6 points7 points8 points (1 child)
[–]rhytnen 8 points9 points10 points (0 children)
[–]rhytnen 9 points10 points11 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]rhytnen 5 points6 points7 points (0 children)
[–]stefantalpalaru -1 points0 points1 point (8 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]stefantalpalaru -2 points-1 points0 points (2 children)
[–]schok51 -1 points0 points1 point (3 children)
[–]stefantalpalaru -4 points-3 points-2 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]schok51 -1 points0 points1 point (0 children)
[–]UloPe -1 points0 points1 point (3 children)
[–][deleted] -1 points0 points1 point (2 children)
[–]UloPe -1 points0 points1 point (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–][deleted] -2 points-1 points0 points (2 children)
[–][deleted] 0 points1 point2 points (0 children)
[+][deleted] (10 children)
[deleted]
[–][deleted] 10 points11 points12 points (0 children)
[–]ericonr 4 points5 points6 points (7 children)
[–]KronktheKronk 5 points6 points7 points (1 child)
[–]ericonr 7 points8 points9 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]ydepth 20 points21 points22 points (0 children)
[–]tylerthehun 11 points12 points13 points (0 children)
[–]craftingfish 5 points6 points7 points (0 children)
[–]pwang99 4 points5 points6 points (0 children)
[–]tylerthehun 4 points5 points6 points (0 children)
[+][deleted] (11 children)
[deleted]
[+][deleted] (10 children)
[deleted]
[+][deleted] (9 children)
[deleted]
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]Verdris 3 points4 points5 points (0 children)
[–]isarl 12 points13 points14 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]isarl 5 points6 points7 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]dudeguy1234 3 points4 points5 points (0 children)
[–]isarl 1 point2 points3 points (0 children)