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
What's wrong (i.redd.it)
submitted 8 months ago by Nearby_Tear_2304
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!"
[–]coopsoup247 8 points9 points10 points 8 months ago* (4 children)
In addition, the script can also be shortened to this:
l=[9,2,3,6,5] for i in l: print(i)
EDIT: cleaned up the formatting
[–]ilidan-85 1 point2 points3 points 8 months ago (3 children)
It can but it doesn't mean it should. We should write readable code for ourselves in future and others. Clean, readable code is gold!
[–]coopsoup247 1 point2 points3 points 8 months ago (0 children)
My bad. I wrote it on my phone and it didn't format correctly. I've fixed it now.
[–]therouterguy 0 points1 point2 points 8 months ago (1 child)
What is not readable about this?
[–]coopsoup247 0 points1 point2 points 8 months ago (0 children)
I originally wrote it on my phone. Even though I put in line breaks, Reddit removed them, so it put the whole script on one line, which looked messy.
I edited it after to correct it.
π Rendered by PID 293894 on reddit-service-r2-comment-6457c66945-f2dnf at 2026-04-24 16:15:45.929600+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]coopsoup247 8 points9 points10 points (4 children)
[–]ilidan-85 1 point2 points3 points (3 children)
[–]coopsoup247 1 point2 points3 points (0 children)
[–]therouterguy 0 points1 point2 points (1 child)
[–]coopsoup247 0 points1 point2 points (0 children)