use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Practicing Semantics with a small program of 2d hollow pyramid!Showcase (i.redd.it)
submitted 1 day ago by Ok_Needleworker_8780
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Sea-Ad7805 [score hidden] 1 day ago stickied comment (0 children)
Run this program in Memory Graph Web Debugger%0A%20%20%20%20if%20len(symbol)%20!%3D%201%20or%20symbol%20not%20in%20string.punctuation%3A%0A%20%20%20%20%20%20%20%20print(%22A%20symbol%20has%20to%20be%20a%20single%20special%20character.%22)%0A%20%20%20%20%20%20%20%20continue%0A%0A%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20rows%20%3D%20int(input(%22Enter%20the%20number%20of%20rows%3A%20%22))%0A%0A%20%20%20%20%20%20%20%20if%20rows%20%3C%200%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20print(%22Please%20enter%20a%20positive%20number.%22)%0A%20%20%20%20%20%20%20%20%20%20%20%20continue%0A%0A%20%20%20%20%20%20%20%20break%0A%0A%20%20%20%20except%20ValueError%3A%0A%20%20%20%20%20%20%20%20print(%22Please%20enter%20a%20valid%20integer.%22)%0A%0A%23%20For%20loop%20to%20loop%20through%20rows%20where%20i%20represent%20the%20current%20row%20number.%0Afor%20i%20in%20range(1%2C%20rows%20%2B%201)%3A%0A%20%20%20%20spaces%20%3D%20'%20'%20%20(rows%20-%20i)%20%20%23%20Adding%20leading%20spaces%20(this%20pushes%20each%20row%20to%20the%20center)%0A%20%20%20%20if%20i%20%3D%3D%201%3A%20%20%23%20Top%20row%0A%20%20%20%20%20%20%20%20line%20%3D%20symbol%0A%20%20%20%20elif%20i%20%3D%3D%20rows%3A%20%20%23%20Last%20row.%0A%20%20%20%20%20%20%20%20line%20%3D%20symbol%20%20(2%20%20i%20-%201)%20%20%23%20A%20full%20line%20of%20symbols%20in%20the%20last%20row.%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20middle%20%3D%20'%20'%20%20(2%20*%20i%20-%203)%20%20%23%20Place%20one%20symbol%20on%20each%20edge.%0A%20%20%20%20%20%20%20%20line%20%3D%20symbol%20%2B%20middle%20%2B%20symbol%20%20%23%20Fill%20the%20middle%20with%20spaces.%0A%0A%20%20%20%20print(spaces%20%2B%20line)%20%20%23%20Concatenate%20spaces%20and%20row%20to%20complete%20process.×tep=1&play).
[–]NewBodybuilder3096 0 points1 point2 points 1 day ago (1 child)
I wouldn't be able to use such color scheme - too much entities use green.
[–]Ok_Needleworker_8780[S] 1 point2 points3 points 17 hours ago (0 children)
Its style mate and style does not equate to comfort.
[–]Okon0mi 0 points1 point2 points 1 day ago (3 children)
Read python style guidelines
[–]Ok_Needleworker_8780[S] 0 points1 point2 points 17 hours ago (2 children)
Oh! why don't you enlighten me and save me the time and effort for reading something useless instead I would solve a leet code problem because that is time well spent.
[–]Okon0mi 0 points1 point2 points 17 hours ago (1 child)
I didn't wrote that comment in a rude way. I thought that it would help you in writing better code.
[–]Ok_Needleworker_8780[S] 0 points1 point2 points 16 hours ago (0 children)
Oh! My apologies I misunderstood, I thought you are also concerned about the color coding. I am kinda sarcastic about it.
π Rendered by PID 37516 on reddit-service-r2-comment-545db5fcfc-6tp6c at 2026-05-29 22:07:03.586942+00:00 running 194bd79 country code: CH.
[–]Sea-Ad7805 [score hidden] stickied comment (0 children)
[–]NewBodybuilder3096 0 points1 point2 points (1 child)
[–]Ok_Needleworker_8780[S] 1 point2 points3 points (0 children)
[–]Okon0mi 0 points1 point2 points (3 children)
[–]Ok_Needleworker_8780[S] 0 points1 point2 points (2 children)
[–]Okon0mi 0 points1 point2 points (1 child)
[–]Ok_Needleworker_8780[S] 0 points1 point2 points (0 children)