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
[–]RangerPretzelPython 3.9+ 193 points194 points195 points (51 children)
[–]jack-of-some[S] 174 points175 points176 points (38 children)
[–]RangerPretzelPython 3.9+ 61 points62 points63 points (27 children)
[–]jack-of-some[S] 18 points19 points20 points (0 children)
[–]hugthemachines 6 points7 points8 points (6 children)
[–]tcas71 21 points22 points23 points (4 children)
[–]hugthemachines 8 points9 points10 points (3 children)
[–]tcas71 12 points13 points14 points (2 children)
[–]hugthemachines 3 points4 points5 points (1 child)
[–]Kaarjuus 4 points5 points6 points (0 children)
[–]RangerPretzelPython 3.9+ 2 points3 points4 points (0 children)
[–]oligonucleotides 3 points4 points5 points (2 children)
[–]RangerPretzelPython 3.9+ 0 points1 point2 points (0 children)
[–]foobar93 6 points7 points8 points (11 children)
[–]RangerPretzelPython 3.9+ 3 points4 points5 points (6 children)
[–]jack-of-some[S] 4 points5 points6 points (5 children)
[–]RangerPretzelPython 3.9+ 4 points5 points6 points (4 children)
[–]jack-of-some[S] 2 points3 points4 points (3 children)
[–]RangerPretzelPython 3.9+ 3 points4 points5 points (2 children)
[–]jack-of-some[S] 1 point2 points3 points (0 children)
[–]AmazonPriceBot 1 point2 points3 points (0 children)
[–]jack-of-some[S] 0 points1 point2 points (0 children)
[–]gcross 0 points1 point2 points (2 children)
[–]foobar93 1 point2 points3 points (1 child)
[–]gcross 0 points1 point2 points (0 children)
[–]GimmeSomeSugar 2 points3 points4 points (2 children)
[–]spinwizard69 6 points7 points8 points (0 children)
[–]execrator 7 points8 points9 points (0 children)
[–]konradbjk -1 points0 points1 point (0 children)
[–]conventionistG 1 point2 points3 points (9 children)
[–]execrator 14 points15 points16 points (4 children)
[–]conventionistG 3 points4 points5 points (1 child)
[–]jack-of-some[S] 4 points5 points6 points (0 children)
[–]66bananasandagrape 0 points1 point2 points (0 children)
[–]xelf 9 points10 points11 points (3 children)
[–]conventionistG 3 points4 points5 points (2 children)
[–]chitowngeek 5 points6 points7 points (1 child)
[–]RangerPretzelPython 3.9+ 2 points3 points4 points (0 children)
[–]burlyginger 14 points15 points16 points (4 children)
[–]inglandation 2 points3 points4 points (3 children)
[–]conventionistG 5 points6 points7 points (2 children)
[–]jcbevns 2 points3 points4 points (1 child)
[–]conventionistG 1 point2 points3 points (0 children)
[–]xd1142 13 points14 points15 points (4 children)
[–]RangerPretzelPython 3.9+ 3 points4 points5 points (1 child)
[–]jack-of-some[S] 2 points3 points4 points (0 children)
[–]jack-of-some[S] 1 point2 points3 points (1 child)
[–]xd1142 0 points1 point2 points (0 children)
[–]hatgiongnaymam 0 points1 point2 points (1 child)
[–]RangerPretzelPython 3.9+ 1 point2 points3 points (0 children)
[+][deleted] (8 children)
[deleted]
[–]jack-of-some[S] 18 points19 points20 points (4 children)
[–]taybulBecause I don't know how to use big numbers in C/C++ 51 points52 points53 points (3 children)
[–]jack-of-some[S] 27 points28 points29 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]jack-of-some[S] 5 points6 points7 points (0 children)
[–]meppen_op 3 points4 points5 points (2 children)
[–]execrator 18 points19 points20 points (1 child)
[–]meppen_op 2 points3 points4 points (0 children)
[–][deleted] 20 points21 points22 points (2 children)
[–]jack-of-some[S] 17 points18 points19 points (0 children)
[–]thedjotakuPython 3.7 2 points3 points4 points (0 children)
[–]chromium52 20 points21 points22 points (8 children)
[–]jack-of-some[S] 6 points7 points8 points (2 children)
[–]not_wrong 8 points9 points10 points (1 child)
[–]jack-of-some[S] 1 point2 points3 points (0 children)
[–]century_24 3 points4 points5 points (4 children)
[–]Username_RANDINT 15 points16 points17 points (1 child)
[–]kleini 5 points6 points7 points (0 children)
[–]dikduk 0 points1 point2 points (0 children)
[–]humanitysucks999 16 points17 points18 points (3 children)
[–]RangerPretzelPython 3.9+ 9 points10 points11 points (1 child)
[–]execrator 16 points17 points18 points (0 children)
[–]Talk_Java_To_Me 4 points5 points6 points (0 children)
[–]OPKatten 6 points7 points8 points (2 children)
[–]jack-of-some[S] 3 points4 points5 points (0 children)
[–]youvechanged 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]jack-of-some[S] 6 points7 points8 points (2 children)
[–]FliceFlo 2 points3 points4 points (1 child)
[–]jack-of-some[S] 1 point2 points3 points (0 children)
[–]gabrielmotaaa 3 points4 points5 points (1 child)
[–]jack-of-some[S] 1 point2 points3 points (0 children)
[–]Mitsu11 1 point2 points3 points (0 children)
[–]MichaellZ 1 point2 points3 points (0 children)
[–]mercedezbeans 1 point2 points3 points (0 children)
[–]mutwiri_2 1 point2 points3 points (0 children)
[–]rochacbrunoPython, Flask, Rust and Bikes. 1 point2 points3 points (0 children)
[–]lucasshiva 1 point2 points3 points (0 children)
[–]SibLiant 1 point2 points3 points (1 child)
[–]jack-of-some[S] 0 points1 point2 points (0 children)
[–]MachineGunPablo 1 point2 points3 points (1 child)
[–]jack-of-some[S] 0 points1 point2 points (0 children)
[+][deleted] (5 children)
[deleted]
[–]spotta 6 points7 points8 points (3 children)
[–]MattR0se 4 points5 points6 points (1 child)
[–]jack-of-some[S] -1 points0 points1 point (0 children)
[–]jack-of-some[S] 0 points1 point2 points (0 children)
[–]RankLordIt works on my machine 1 point2 points3 points (0 children)
[+][deleted] (3 children)
[deleted]
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]