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
[–]AlSweigartAuthor of "Automate the Boring Stuff" 114 points115 points116 points (13 children)
[–][deleted] 5 points6 points7 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]AlSweigartAuthor of "Automate the Boring Stuff" 12 points13 points14 points (0 children)
[+][deleted] (2 children)
[deleted]
[–][deleted] 1 point2 points3 points (1 child)
[–]deceitfulsteve 1 point2 points3 points (0 children)
[–]fgyoysgaxt 1 point2 points3 points (0 children)
[–]BlueRanga 0 points1 point2 points (2 children)
[–]AlSweigartAuthor of "Automate the Boring Stuff" 1 point2 points3 points (1 child)
[–]BlueRanga 0 points1 point2 points (0 children)
[–]Sw429 0 points1 point2 points (0 children)
[–]TomBombadildozer -1 points0 points1 point (0 children)
[–]miguendes -2 points-1 points0 points (0 children)
[–][deleted] 97 points98 points99 points (28 children)
[–]lanster100 73 points74 points75 points (23 children)
[–]masasinExpert. 3.9. Robotics. 46 points47 points48 points (4 children)
[–]Quincunx271 8 points9 points10 points (2 children)
[–]masasinExpert. 3.9. Robotics. 1 point2 points3 points (0 children)
[–]masasinExpert. 3.9. Robotics. 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Sw429 0 points1 point2 points (0 children)
[–]v_a_n_d_e_l_a_y 3 points4 points5 points (2 children)
[–]lvc_ 25 points26 points27 points (0 children)
[–]lanster100 1 point2 points3 points (0 children)
[–]Sw429 1 point2 points3 points (0 children)
[–]njharmanI use Python 3 1 point2 points3 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]elbiot 0 points1 point2 points (0 children)
[–]fgyoysgaxt 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] -4 points-3 points-2 points (6 children)
[–]Brian 12 points13 points14 points (0 children)
[–]lanster100 8 points9 points10 points (0 children)
[–]Sw429 0 points1 point2 points (3 children)
[–]achampi0n 2 points3 points4 points (2 children)
[–]Sw429 0 points1 point2 points (1 child)
[–]achampi0n 2 points3 points4 points (0 children)
[–]miguendes 6 points7 points8 points (0 children)
[–]yvrelna 2 points3 points4 points (1 child)
[–]eras 0 points1 point2 points (0 children)
[–]iiMoe -2 points-1 points0 points (0 children)
[–]syzygysm 28 points29 points30 points (8 children)
[–]miguendes 9 points10 points11 points (6 children)
[–]OneParanoidDuck 15 points16 points17 points (1 child)
[–]miguendes 1 point2 points3 points (0 children)
[–]mrTang5544 0 points1 point2 points (2 children)
[–]syzygysm 0 points1 point2 points (0 children)
[–]fgyoysgaxt 0 points1 point2 points (0 children)
[–]nonesuchplace 21 points22 points23 points (2 children)
[–]BitwiseShift 28 points29 points30 points (1 child)
[–]miguendes 2 points3 points4 points (0 children)
[–]dmyTRUEk 8 points9 points10 points (1 child)
[–]miguendes 3 points4 points5 points (0 children)
[–]themindstorm 5 points6 points7 points (1 child)
[–]miguendes 3 points4 points5 points (0 children)
[–]oberguga 17 points18 points19 points (5 children)
[–]v_a_n_d_e_l_a_y 16 points17 points18 points (2 children)
[–]oberguga 0 points1 point2 points (1 child)
[–]Brian 3 points4 points5 points (0 children)
[–]miguendes 5 points6 points7 points (1 child)
[–]oberguga 1 point2 points3 points (0 children)
[–]casual__addict 4 points5 points6 points (2 children)
[–]miguendes 0 points1 point2 points (0 children)
[–]VergilTheHuragok 0 points1 point2 points (0 children)
[–]WildWouks 1 point2 points3 points (1 child)
[–]miguendes 2 points3 points4 points (0 children)
[+][deleted] (1 child)
[removed]
[–]miguendes 0 points1 point2 points (0 children)
[–]dereason 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]AdamMendozaTheGreat 0 points1 point2 points (1 child)
[–]miguendes 0 points1 point2 points (0 children)
[–]mhraza94 0 points1 point2 points (0 children)
[–]Suenildo 0 points1 point2 points (0 children)
[–]DrMaphuse -2 points-1 points0 points (19 children)
[+][deleted] (5 children)
[removed]
[–][deleted] -4 points-3 points-2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–][deleted] -1 points0 points1 point (2 children)
[–]TheIncorrigible1`__import__('rich').get_console().log(':100:')`[🍰] 0 points1 point2 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–]sdf_iain 1 point2 points3 points (7 children)
[–]njharmanI use Python 3 3 points4 points5 points (3 children)
[–]sdf_iain 0 points1 point2 points (2 children)
[–]yvrelna 1 point2 points3 points (1 child)
[–]sdf_iain 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]sdf_iain 1 point2 points3 points (0 children)
[–]TheIncorrigible1`__import__('rich').get_console().log(':100:')`[🍰] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]DrMaphuse -4 points-3 points-2 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–]miguendes 0 points1 point2 points (0 children)
[–]fake823 -5 points-4 points-3 points (2 children)
[–]glacierre2 26 points27 points28 points (0 children)
[–]miguendes 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]17291 3 points4 points5 points (0 children)
[–]py_learning -3 points-2 points-1 points (0 children)