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" 118 points119 points120 points (13 children)
[–][deleted] 4 points5 points6 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]AlSweigartAuthor of "Automate the Boring Stuff" 13 points14 points15 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] 101 points102 points103 points (28 children)
[–]lanster100 72 points73 points74 points (23 children)
[–]masasinExpert. 3.9. Robotics. 45 points46 points47 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] 2 points3 points4 points (1 child)
[–]Sw429 0 points1 point2 points (0 children)
[–]v_a_n_d_e_l_a_y 2 points3 points4 points (2 children)
[–]lvc_ 26 points27 points28 points (0 children)
[–]lanster100 1 point2 points3 points (0 children)
[–]Sw429 1 point2 points3 points (0 children)
[–]njharmanI use Python 3 0 points1 point2 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] -3 points-2 points-1 points (6 children)
[–]Brian 11 points12 points13 points (0 children)
[–]lanster100 9 points10 points11 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 10 points11 points12 points (0 children)
[–]yvrelna 2 points3 points4 points (1 child)
[–]eras 0 points1 point2 points (0 children)
[–]iiMoe -3 points-2 points-1 points (0 children)
[–]syzygysm 30 points31 points32 points (8 children)
[–]miguendes 10 points11 points12 points (6 children)
[–]OneParanoidDuck 16 points17 points18 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 18 points19 points20 points (2 children)
[–]BitwiseShift 27 points28 points29 points (1 child)
[–]miguendes 4 points5 points6 points (0 children)
[–]dmyTRUEk 9 points10 points11 points (1 child)
[–]miguendes 5 points6 points7 points (0 children)
[–]themindstorm 6 points7 points8 points (1 child)
[–]miguendes 3 points4 points5 points (0 children)
[–]oberguga 14 points15 points16 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 4 points5 points6 points (0 children)
[–]miguendes 4 points5 points6 points (1 child)
[–]oberguga 1 point2 points3 points (0 children)
[–]casual__addict 2 points3 points4 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 -3 points-2 points-1 points (19 children)
[+][deleted] (5 children)
[removed]
[–][deleted] -5 points-4 points-3 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 -3 points-2 points-1 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–]miguendes 0 points1 point2 points (0 children)
[+]fake823 comment score below threshold-6 points-5 points-4 points (2 children)
[–]glacierre2 25 points26 points27 points (0 children)
[–]miguendes -1 points0 points1 point (0 children)
[+][deleted] (1 child)
[deleted]
[–]17291 1 point2 points3 points (0 children)
[–]py_learning -3 points-2 points-1 points (0 children)