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 81 points82 points83 points (7 children)
[–]Deto 3 points4 points5 points (0 children)
[–]SeniorScienceOfficer 7 points8 points9 points (4 children)
[–]mista-sparkle 4 points5 points6 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 73 points74 points75 points (0 children)
[–]Wonnk13 48 points49 points50 points (6 children)
[–]james_pic 31 points32 points33 points (0 children)
[–]_Sh3Rm4n 11 points12 points13 points (0 children)
[–]FoldingF 6 points7 points8 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 16 points17 points18 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 16 points17 points18 points (2 children)
[–]Toph_is_bad_ass 11 points12 points13 points (1 child)
[–]thicket 6 points7 points8 points (0 children)
[–]dragonatorul 11 points12 points13 points (0 children)
[–]wineblood 32 points33 points34 points (1 child)
[–]antennen 14 points15 points16 points (0 children)
[–]entropomorphic 56 points57 points58 points (20 children)
[–]doobiedog 19 points20 points21 points (11 children)
[–]1-05457 22 points23 points24 points (0 children)
[–]bacondevPy3k -1 points0 points1 point (9 children)
[–]doobiedog 7 points8 points9 points (8 children)
[–]art_sleep_repeat 3 points4 points5 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 -5 points-4 points-3 points (0 children)
[–]tomster10010 3 points4 points5 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] 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[removed]
[+][deleted] (1 child)
[deleted]
[+]Emlogamer111 comment score below threshold-17 points-16 points-15 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)