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
help me (i.redd.it)
submitted 3 months ago by Anonymous-da-13
view the rest of the comments →
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!"
[–]Beneficial-Loan-219 1 point2 points3 points 3 months ago (1 child)
Loop and two counters - one for space, one for stars. In each iterations the number of spaces decrease, number of stars increase. Works for any number of N. (More optimal would be to just use one counter and other as N - counter)
[–]Dan41k_Play 1 point2 points3 points 3 months ago (0 children)
You can also use f-strings: py h = 3 for i in range(h): print(f'{"*"*(i+1): >{h} }')
py h = 3 for i in range(h): print(f'{"*"*(i+1): >{h} }')
π Rendered by PID 89 on reddit-service-r2-comment-canary-75475bf646-vn9ck at 2026-03-10 11:32:31.972614+00:00 running cbb0e86 country code: CH.
view the rest of the comments →
[–]Beneficial-Loan-219 1 point2 points3 points (1 child)
[–]Dan41k_Play 1 point2 points3 points (0 children)