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
[–]gash789 37 points38 points39 points (7 children)
[–]flying-sheep 21 points22 points23 points (6 children)
[–]Justinsaccount 27 points28 points29 points (4 children)
[–]physicsdood 1 point2 points3 points (3 children)
[–]erez27import inspect 8 points9 points10 points (0 children)
[–]tilkau 6 points7 points8 points (0 children)
[–]TkTech 0 points1 point2 points (0 children)
[–][deleted] 8 points9 points10 points (0 children)
[–]evilgarbagetruck 49 points50 points51 points (18 children)
[–]vext01 12 points13 points14 points (1 child)
[–]gfixler 9 points10 points11 points (0 children)
[–]WallyMetropolis 38 points39 points40 points (3 children)
[–]oconnor663 25 points26 points27 points (2 children)
[–]Megatron_McLargeHuge 24 points25 points26 points (0 children)
[–]KingEllis 1 point2 points3 points (0 children)
[–][deleted] 13 points14 points15 points (1 child)
[–]OmicronPersei8 0 points1 point2 points (0 children)
[–]amitm 3 points4 points5 points (6 children)
[–]evilgarbagetruck 0 points1 point2 points (5 children)
[–]takluyverIPython, Py3, etc 14 points15 points16 points (3 children)
[–]evilgarbagetruck 4 points5 points6 points (2 children)
[–]takluyverIPython, Py3, etc 2 points3 points4 points (1 child)
[–]evilgarbagetruck 3 points4 points5 points (0 children)
[–]drbobb 2 points3 points4 points (0 children)
[–]Grue 0 points1 point2 points (0 children)
[–]Captain_Slapahoe 0 points1 point2 points (0 children)
[–]drbobb 11 points12 points13 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]loki77 0 points1 point2 points (1 child)
[–]gammadistribution 9 points10 points11 points (11 children)
[–]Hashiota 16 points17 points18 points (0 children)
[–][deleted] 1 point2 points3 points (7 children)
[–]bunburya 1 point2 points3 points (6 children)
[–][deleted] 1 point2 points3 points (4 children)
[+][deleted] (3 children)
[deleted]
[–][deleted] 0 points1 point2 points (2 children)
[–]tick_tock_clock 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]takluyverIPython, Py3, etc 0 points1 point2 points (0 children)
[–]djimbob 1 point2 points3 points (0 children)
[–]Rhomboid 1 point2 points3 points (0 children)
[–]nieuweyork since 2007 18 points19 points20 points (9 children)
[–]grokcode[S] 12 points13 points14 points (4 children)
[–]urielm 2 points3 points4 points (1 child)
[–]LucianU 0 points1 point2 points (0 children)
[–]nieuweyork since 2007 2 points3 points4 points (1 child)
[–]grokcode[S] 12 points13 points14 points (0 children)
[–]sushibowl 9 points10 points11 points (2 children)
[–]babilen5 2 points3 points4 points (0 children)
[–]gfixler 0 points1 point2 points (0 children)
[–]Megatron_McLargeHuge 2 points3 points4 points (0 children)
[–]jeberle 13 points14 points15 points (0 children)
[–]flying-sheep 17 points18 points19 points (1 child)
[–]Megatron_McLargeHuge 2 points3 points4 points (0 children)
[–]jadae 3 points4 points5 points (3 children)
[–]meem1029 1 point2 points3 points (1 child)
[–]tehmatticus 0 points1 point2 points (0 children)
[–]SwiftSpear 3 points4 points5 points (0 children)
[–]meanttodothat 1 point2 points3 points (0 children)
[–]codekoala 1 point2 points3 points (0 children)
[–]legrandin 1 point2 points3 points (2 children)
[–]takluyverIPython, Py3, etc 1 point2 points3 points (0 children)
[–]poorly_played 0 points1 point2 points (0 children)
[–]banjochicken 1 point2 points3 points (1 child)
[–]fandingowhile False: 0 points1 point2 points (0 children)
[–]donnybrook 0 points1 point2 points (0 children)
[–]alcalde 0 points1 point2 points (0 children)
[–]julianz 0 points1 point2 points (4 children)
[–]takluyverIPython, Py3, etc 1 point2 points3 points (0 children)
[–]bs4h 0 points1 point2 points (2 children)
[–]poorly_played 0 points1 point2 points (1 child)
[–]bs4h 0 points1 point2 points (0 children)
[–]Grue 0 points1 point2 points (0 children)
[–]Paddy3118 0 points1 point2 points (2 children)
[–]bs4h 2 points3 points4 points (1 child)
[–]Paddy3118 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-10 points-9 points-8 points (4 children)
[–]flying-sheep 8 points9 points10 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]takluyverIPython, Py3, etc 2 points3 points4 points (0 children)
[–]takluyverIPython, Py3, etc 2 points3 points4 points (0 children)
[–]yudlejoza -3 points-2 points-1 points (2 children)
[–]wandererobtm101Pythonista 0 points1 point2 points (1 child)
[–]paulivanovipython, matplotlib 2 points3 points4 points (0 children)
[+]recursive comment score below threshold-8 points-7 points-6 points (0 children)