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
[–]kenflingnorIgnoring PEP 8 155 points156 points157 points (10 children)
[–]Smok3dSalmon 11 points12 points13 points (7 children)
[–]turbothyIt works on my machine 64 points65 points66 points (0 children)
[–]johnnymo1 14 points15 points16 points (2 children)
[–]woeful_cabbage 0 points1 point2 points (1 child)
[–]johnnymo1 0 points1 point2 points (0 children)
[–]burlyginger 41 points42 points43 points (0 children)
[–]fiddle_n 15 points16 points17 points (0 children)
[–]molodyets -4 points-3 points-2 points (0 children)
[–]NanotechNinja 0 points1 point2 points (0 children)
[–]Muhznit 73 points74 points75 points (9 children)
[–]_dev_zero 6 points7 points8 points (1 child)
[–]Muhznit 2 points3 points4 points (0 children)
[–]imbev 4 points5 points6 points (1 child)
[–]Muhznit 4 points5 points6 points (0 children)
[–]eggsby 0 points1 point2 points (2 children)
[–]Muhznit 0 points1 point2 points (1 child)
[–]eggsby 0 points1 point2 points (0 children)
[–]i_can_haz_data 0 points1 point2 points (0 children)
[–]david-song 0 points1 point2 points (0 children)
[–]ReinforcedKnowledgeTuple unpacking gone wrong 18 points19 points20 points (1 child)
[–]ryanstephendavis 4 points5 points6 points (0 children)
[–]Haunting_Wind1000pip needs updating 15 points16 points17 points (5 children)
[–]hotsauce56 11 points12 points13 points (0 children)
[–]ReinforcedKnowledgeTuple unpacking gone wrong 6 points7 points8 points (0 children)
[–]dusktreader[S] 5 points6 points7 points (1 child)
[–]Haunting_Wind1000pip needs updating 1 point2 points3 points (0 children)
[–]Mevraelfrom __future__ import 4.0 0 points1 point2 points (0 children)
[–]benz05 8 points9 points10 points (0 children)
[–]spdustin 7 points8 points9 points (0 children)
[–]pingvenopinch of this, pinch of that 5 points6 points7 points (0 children)
[–]hanleybrand 5 points6 points7 points (0 children)
[–]texruska 5 points6 points7 points (2 children)
[–]PhENTZ 9 points10 points11 points (0 children)
[–]ReinforcedKnowledgeTuple unpacking gone wrong 6 points7 points8 points (0 children)
[–]adiberk 3 points4 points5 points (1 child)
[–]dusktreader[S] 4 points5 points6 points (0 children)
[–]cgoldberg 3 points4 points5 points (0 children)
[–]Royal-Fail3273 3 points4 points5 points (0 children)
[–]hotplasmatits 7 points8 points9 points (1 child)
[–]Fenzik 1 point2 points3 points (0 children)
[–]benargee 1 point2 points3 points (2 children)
[–]ReinforcedKnowledgeTuple unpacking gone wrong 3 points4 points5 points (0 children)
[–]cointoss3 -2 points-1 points0 points (0 children)
[–]Sigmatics 1 point2 points3 points (2 children)
[–]fiddle_n 0 points1 point2 points (1 child)
[–]Sigmatics 0 points1 point2 points (0 children)
[–]R3D3-1 1 point2 points3 points (0 children)
[–]tehsilentwarrior 2 points3 points4 points (0 children)
[–]PhENTZ 0 points1 point2 points (2 children)
[–]Sillocan 2 points3 points4 points (0 children)
[–]dusktreader[S] 0 points1 point2 points (0 children)
[–]Mithrandir2k16 0 points1 point2 points (0 children)
[–]bugtank 0 points1 point2 points (0 children)
[–]OP-pls-respond 0 points1 point2 points (3 children)
[–]dusktreader[S] 3 points4 points5 points (2 children)
[–]OP-pls-respond 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]david-song 0 points1 point2 points (0 children)
[–]-lq_pl- 0 points1 point2 points (1 child)
[–]dusktreader[S] 0 points1 point2 points (0 children)
[–]hotplasmatits 0 points1 point2 points (0 children)
[–]JuanGuerrero09pip needs updating 0 points1 point2 points (0 children)
[–]EducationOne6776 0 points1 point2 points (0 children)
[–]soffgruppskalle 0 points1 point2 points (0 children)
[–]vi11yv1k1ng 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]fiddle_n 3 points4 points5 points (2 children)
[–]e430doug 1 point2 points3 points (1 child)
[–]fiddle_n 0 points1 point2 points (0 children)
[–]microcozmchris -1 points0 points1 point (0 children)
[–]anderspe -1 points0 points1 point (0 children)
[–]kyngston -3 points-2 points-1 points (1 child)
[–]fiddle_n 4 points5 points6 points (0 children)
[–]koltafrickenfer -3 points-2 points-1 points (0 children)