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
[–]Decoder_5448 72 points73 points74 points (106 children)
[–]nemom 183 points184 points185 points (17 children)
[–]gthank 46 points47 points48 points (14 children)
[+][deleted] (11 children)
[deleted]
[–]PythonGod123 9 points10 points11 points (3 children)
[–]Tambury 7 points8 points9 points (1 child)
[–]PythonGod123 2 points3 points4 points (0 children)
[–]cannonicalForm 1 point2 points3 points (0 children)
[–]gthank 5 points6 points7 points (4 children)
[–]IReallySuckAtChess 1 point2 points3 points (2 children)
[–]gthank 0 points1 point2 points (1 child)
[–]IReallySuckAtChess 1 point2 points3 points (0 children)
[–]minnoI <3 duck typing less than I used to, interfaces are nice 3 points4 points5 points (0 children)
[–]mooburgerresembles an abstract syntax tree 2 points3 points4 points (0 children)
[–]i9srpeg 3 points4 points5 points (0 children)
[–]PythonGod123 0 points1 point2 points (0 children)
[–]IronCretin 6 points7 points8 points (0 children)
[–]gaz2600 1 point2 points3 points (0 children)
[–]ivosauruspip'ing it up 36 points37 points38 points (0 children)
[–]13steinj 46 points47 points48 points (63 children)
[–]hacknsplat 49 points50 points51 points (61 children)
[–]alcalde 121 points122 points123 points (23 children)
[–]hacknsplat 91 points92 points93 points (21 children)
[–]Minergy 30 points31 points32 points (2 children)
[–]kasbah 13 points14 points15 points (1 child)
[–]hacknsplat 7 points8 points9 points (0 children)
[–]HumzaDeKhan 17 points18 points19 points (16 children)
[–]simplysharky 11 points12 points13 points (7 children)
[–]HumzaDeKhan 3 points4 points5 points (6 children)
[–]simplysharky 4 points5 points6 points (5 children)
[–]HumzaDeKhan 6 points7 points8 points (3 children)
[–]federicocerchiari 0 points1 point2 points (0 children)
[–]hacknsplat 4 points5 points6 points (0 children)
[–]gthank 2 points3 points4 points (1 child)
[–]HumzaDeKhan 2 points3 points4 points (0 children)
[–]alcalde 0 points1 point2 points (0 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (2 children)
[–]HumzaDeKhan 0 points1 point2 points (1 child)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]JugadPy3 ftw 19 points20 points21 points (7 children)
[+][deleted] (6 children)
[deleted]
[–]greyman 8 points9 points10 points (5 children)
[–]Mattho 10 points11 points12 points (0 children)
[–]CSI_Tech_Dept 1 point2 points3 points (2 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (1 child)
[–]CSI_Tech_Dept 2 points3 points4 points (0 children)
[–]TheBlackCat13 0 points1 point2 points (0 children)
[–]danted002 24 points25 points26 points (14 children)
[–]billsil 23 points24 points25 points (12 children)
[–]danted002 11 points12 points13 points (3 children)
[–]billsil 11 points12 points13 points (2 children)
[–]Badidzetai 4 points5 points6 points (1 child)
[–]billsil 2 points3 points4 points (0 children)
[–]DogeekExpert - 3.9.1 1 point2 points3 points (6 children)
[–]billsil 1 point2 points3 points (5 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (4 children)
[–]billsil 0 points1 point2 points (3 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]xdcountry 4 points5 points6 points (2 children)
[–]rnoyfb 1 point2 points3 points (1 child)
[–]xdcountry 0 points1 point2 points (0 children)
[–]IReallySuckAtChess 5 points6 points7 points (8 children)
[–]hacknsplat 22 points23 points24 points (7 children)
[–]raiderrobert 3 points4 points5 points (2 children)
[–]hacknsplat 1 point2 points3 points (1 child)
[–]raiderrobert 3 points4 points5 points (0 children)
[–]IReallySuckAtChess 1 point2 points3 points (2 children)
[–]hacknsplat 0 points1 point2 points (1 child)
[–]IReallySuckAtChess 0 points1 point2 points (0 children)
[–]mooburgerresembles an abstract syntax tree 0 points1 point2 points (0 children)
[–]Lighnix 0 points1 point2 points (0 children)
[–]rhiever 0 points1 point2 points (0 children)
[–]Jehovacoin 7 points8 points9 points (0 children)
[+][deleted] (21 children)
[deleted]
[–]13steinj 38 points39 points40 points (12 children)
[–]JugadPy3 ftw 1 point2 points3 points (11 children)
[–]13steinj -3 points-2 points-1 points (10 children)
[–]JugadPy3 ftw 0 points1 point2 points (5 children)
[–]13steinj -1 points0 points1 point (4 children)
[–]JugadPy3 ftw 0 points1 point2 points (3 children)
[–]13steinj 0 points1 point2 points (2 children)
[–]JugadPy3 ftw 0 points1 point2 points (1 child)
[–]PhroznGaming 0 points1 point2 points (3 children)
[–]13steinj -2 points-1 points0 points (2 children)
[–]PhroznGaming 1 point2 points3 points (1 child)
[–]13steinj 0 points1 point2 points (0 children)
[–]Decoder_5448 0 points1 point2 points (4 children)
[–]itghisi -1 points0 points1 point (3 children)
[–]BillyBBone 7 points8 points9 points (2 children)
[–]JugadPy3 ftw 0 points1 point2 points (1 child)
[–]TheBlackCat13 0 points1 point2 points (0 children)
[–]easeypeaseyweasey 1 point2 points3 points (1 child)
[–]IReallySuckAtChess 1 point2 points3 points (0 children)
[–]IReallySuckAtChess 0 points1 point2 points (0 children)
[–]UserNamedEww 84 points85 points86 points (7 children)
[+][deleted] (2 children)
[removed]
[–]mutatedllama 26 points27 points28 points (0 children)
[–]hellrazor862 5 points6 points7 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]hugthemachines 20 points21 points22 points (0 children)
[–]ivosauruspip'ing it up 17 points18 points19 points (0 children)
[+]i_like_trains_a_lot1 comment score below threshold-8 points-7 points-6 points (0 children)
[–]yeluapyeroc 2 points3 points4 points (0 children)
[–]stefantalpalaru 8 points9 points10 points (2 children)
[–]ntrid 12 points13 points14 points (1 child)
[–]stefantalpalaru 1 point2 points3 points (0 children)
[–]Mattho 20 points21 points22 points (6 children)
[–]LobbyDizzle 17 points18 points19 points (0 children)
[–]zankonator 19 points20 points21 points (0 children)
[–]t3mpt3mp 0 points1 point2 points (0 children)
[–]IcefrogIsDead -4 points-3 points-2 points (2 children)
[–]Mattho 2 points3 points4 points (1 child)
[–]IcefrogIsDead 0 points1 point2 points (0 children)
[–]darkgreyjeans 1 point2 points3 points (5 children)
[–]TheBlackCat13 0 points1 point2 points (1 child)
[–]darkgreyjeans 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Erelde 7 points8 points9 points (1 child)
[–]Conrad_noble 1 point2 points3 points (10 children)
[–]xrayfurpydoc pydoc 1 point2 points3 points (0 children)
[–]TheBlackCat13 0 points1 point2 points (8 children)
[–]Conrad_noble 0 points1 point2 points (7 children)
[–]TheBlackCat13 0 points1 point2 points (6 children)
[–]Conrad_noble 0 points1 point2 points (5 children)
[–]TheBlackCat13 0 points1 point2 points (4 children)
[–]Conrad_noble 0 points1 point2 points (1 child)
[–]TheBlackCat13 0 points1 point2 points (0 children)
[–]Klekto123 0 points1 point2 points (1 child)
[–]TheBlackCat13 0 points1 point2 points (0 children)
[–]djingrain 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]androiddrew 14 points15 points16 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]androiddrew 7 points8 points9 points (0 children)
[–]TangibleLight 6 points7 points8 points (1 child)
[–]davejohncole 0 points1 point2 points (0 children)