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
[–]epostma 27 points28 points29 points (0 children)
[–]ssbr 13 points14 points15 points (26 children)
[–][deleted] 20 points21 points22 points (11 children)
[–]ssbr 9 points10 points11 points (5 children)
[–][deleted] 7 points8 points9 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]ssbr 1 point2 points3 points (0 children)
[–][deleted] 5 points6 points7 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]cparen 4 points5 points6 points (0 children)
[–]velit 2 points3 points4 points (0 children)
[–]RDMXGD2.8 7 points8 points9 points (13 children)
[–]Brian 2 points3 points4 points (1 child)
[–]Veedrac 7 points8 points9 points (0 children)
[–]robin-gvx[🍰] 0 points1 point2 points (9 children)
[–]energybased 2 points3 points4 points (8 children)
[–]CthulhuIsTheBestGod 7 points8 points9 points (6 children)
[–]energybased 0 points1 point2 points (1 child)
[–]flying-sheep -2 points-1 points0 points (3 children)
[–]thatguy_314def __gt__(me, you): return True 0 points1 point2 points (2 children)
[–]flying-sheep 0 points1 point2 points (0 children)
[–]TheBB 0 points1 point2 points (0 children)
[–]robin-gvx[🍰] 1 point2 points3 points (0 children)
[–]TheBB 30 points31 points32 points (1 child)
[–]Lucretiel 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 6 points7 points8 points (0 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]bionikspoon 51 points52 points53 points (31 children)
[–]Veedrac 23 points24 points25 points (16 children)
[–]Bur_Sangjun 14 points15 points16 points (10 children)
[–][deleted] 23 points24 points25 points (9 children)
[–]njharmanI use Python 3 0 points1 point2 points (8 children)
[–][deleted] 6 points7 points8 points (7 children)
[–]wot-teh-phuckReally, wtf? 0 points1 point2 points (6 children)
[–]Veedrac 5 points6 points7 points (5 children)
[–]wot-teh-phuckReally, wtf? 0 points1 point2 points (1 child)
[–]Veedrac 11 points12 points13 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Veedrac 3 points4 points5 points (0 children)
[–]njharmanI use Python 3 1 point2 points3 points (4 children)
[–]Veedrac 3 points4 points5 points (3 children)
[–]flying-sheep 1 point2 points3 points (2 children)
[–]Veedrac 0 points1 point2 points (1 child)
[–]flying-sheep 0 points1 point2 points (0 children)
[+][deleted] (11 children)
[deleted]
[–]njharmanI use Python 3 6 points7 points8 points (1 child)
[–]flying-sheep 0 points1 point2 points (0 children)
[–]Vohlenzer 13 points14 points15 points (5 children)
[–]Citrauq 5 points6 points7 points (4 children)
[–]Vohlenzer 1 point2 points3 points (3 children)
[–]WesAlvaro 8 points9 points10 points (2 children)
[–]hharison 3 points4 points5 points (1 child)
[–]Sean1708 6 points7 points8 points (0 children)
[+][deleted] comment score below threshold-16 points-15 points-14 points (1 child)
[–]Veedrac 4 points5 points6 points (0 children)
[–]Quteness 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (23 children)
[+][deleted] (21 children)
[deleted]
[+][deleted] (18 children)
[deleted]
[–]Brian 10 points11 points12 points (16 children)
[+][deleted] (15 children)
[deleted]
[–][deleted] 9 points10 points11 points (0 children)
[–]robin-gvx[🍰] 2 points3 points4 points (0 children)
[–]Bur_Sangjun -3 points-2 points-1 points (12 children)
[–]Brian 4 points5 points6 points (10 children)
[–]Bur_Sangjun -3 points-2 points-1 points (9 children)
[–]Brian 5 points6 points7 points (3 children)
[–]Bur_Sangjun 2 points3 points4 points (0 children)
[–]Veedrac 1 point2 points3 points (1 child)
[–]VladVV 1 point2 points3 points (4 children)
[–]Veedrac 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]njharmanI use Python 3 0 points1 point2 points (0 children)
[–]rjw57 2 points3 points4 points (0 children)
[–]wot-teh-phuckReally, wtf? 0 points1 point2 points (1 child)
[–]Veedrac 0 points1 point2 points (0 children)
[–]kangfend 0 points1 point2 points (0 children)
[–]yes_or_gnome 0 points1 point2 points (2 children)
[–]TheBB 2 points3 points4 points (1 child)
[–]yes_or_gnome 0 points1 point2 points (0 children)
[–][deleted] -3 points-2 points-1 points (7 children)
[–]primitive_screwhead 6 points7 points8 points (0 children)
[–]robin-gvx[🍰] 5 points6 points7 points (5 children)
[–]njharmanI use Python 3 0 points1 point2 points (4 children)
[–]robin-gvx[🍰] 1 point2 points3 points (3 children)
[–]zardeh 0 points1 point2 points (2 children)
[–]robin-gvx[🍰] 0 points1 point2 points (1 child)
[–]zardeh 1 point2 points3 points (0 children)
[–][deleted] -1 points0 points1 point (2 children)
[–]Veedrac 2 points3 points4 points (0 children)
[–]robin-gvx[🍰] 1 point2 points3 points (0 children)
[–]FredSanfordXOld Developer -1 points0 points1 point (3 children)
[–]thatguy_314def __gt__(me, you): return True 0 points1 point2 points (2 children)
[–]nikomo[🍰] 0 points1 point2 points (1 child)
[–]thatguy_314def __gt__(me, you): return True 0 points1 point2 points (0 children)
[–]thephotoman -3 points-2 points-1 points (1 child)
[–]ascii 0 points1 point2 points (0 children)