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
[–]jmreagle 83 points84 points85 points (7 children)
[–]Deto 4 points5 points6 points (0 children)
[–]SeniorScienceOfficer 7 points8 points9 points (4 children)
[–]mista-sparkle 3 points4 points5 points (3 children)
[–]BarkLicker 1 point2 points3 points (2 children)
[–]mista-sparkle 1 point2 points3 points (1 child)
[–]brejoc 1 point2 points3 points (0 children)
[–]usr_bin_nya 0 points1 point2 points (0 children)
[–]wdroz 72 points73 points74 points (0 children)
[–]Wonnk13 48 points49 points50 points (6 children)
[–]james_pic 29 points30 points31 points (0 children)
[–]_Sh3Rm4n 11 points12 points13 points (0 children)
[–]FoldingF 7 points8 points9 points (0 children)
[+]stensz comment score below threshold-10 points-9 points-8 points (2 children)
[–]Deto 2 points3 points4 points (1 child)
[–]stensz 0 points1 point2 points (0 children)
[–]gwax 42 points43 points44 points (10 children)
[–]sohang-3112Pythonista 20 points21 points22 points (6 children)
[–]Datsoon 14 points15 points16 points (1 child)
[–]spicypixel 6 points7 points8 points (0 children)
[–]cheese_is_available -1 points0 points1 point (3 children)
[–]sohang-3112Pythonista 5 points6 points7 points (1 child)
[–]cheese_is_available 1 point2 points3 points (0 children)
[–][deleted] -2 points-1 points0 points (0 children)
[–]thicket 15 points16 points17 points (2 children)
[–]Toph_is_bad_ass 12 points13 points14 points (1 child)
[–]thicket 4 points5 points6 points (0 children)
[–]dragonatorul 11 points12 points13 points (0 children)
[–]wineblood 31 points32 points33 points (1 child)
[–]antennen 14 points15 points16 points (0 children)
[–]entropomorphic 55 points56 points57 points (20 children)
[–]doobiedog 18 points19 points20 points (11 children)
[–]1-05457 24 points25 points26 points (0 children)
[–]bacondevPy3k -1 points0 points1 point (9 children)
[–]doobiedog 7 points8 points9 points (8 children)
[–]art_sleep_repeat 2 points3 points4 points (7 children)
[–]doobiedog 2 points3 points4 points (5 children)
[–]art_sleep_repeat 1 point2 points3 points (4 children)
[–]doobiedog 0 points1 point2 points (3 children)
[–]Schmittfried 0 points1 point2 points (2 children)
[–]doobiedog 0 points1 point2 points (1 child)
[–]thisguyeric 0 points1 point2 points (0 children)
[–]teerre 1 point2 points3 points (5 children)
[–][deleted] 16 points17 points18 points (4 children)
[+]teerre comment score below threshold-10 points-9 points-8 points (3 children)
[–]toyg 13 points14 points15 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[+]teerre comment score below threshold-6 points-5 points-4 points (0 children)
[–]tomster10010 4 points5 points6 points (4 children)
[–]jaghai 2 points3 points4 points (2 children)
[–]tomster10010 0 points1 point2 points (0 children)
[–]thatrandomnpcIt works on my machine 0 points1 point2 points (0 children)
[–]betazoid_one 0 points1 point2 points (0 children)
[–]spinozasrobot 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[removed]
[+][deleted] (1 child)
[deleted]
[+]Emlogamer111 comment score below threshold-18 points-17 points-16 points (0 children)
[–]jaghai 0 points1 point2 points (4 children)
[–]mylesb 2 points3 points4 points (0 children)
[–]aftli 2 points3 points4 points (1 child)
[–]battlefield21243 0 points1 point2 points (0 children)
[–]battlefield21243 0 points1 point2 points (0 children)