MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PythonLearning/comments/1msspug/whats_wrong/n98hpf8/?context=3
r/PythonLearning • u/Nearby_Tear_2304 • Aug 17 '25
45 comments sorted by
View all comments
Show parent comments
9
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
2 u/ilidan-85 Aug 17 '25 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! 1 u/therouterguy Aug 17 '25 What is not readable about this? 1 u/coopsoup247 Aug 17 '25 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.
2
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!
1 u/therouterguy Aug 17 '25 What is not readable about this? 1 u/coopsoup247 Aug 17 '25 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.
1
What is not readable about this?
1 u/coopsoup247 Aug 17 '25 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.
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.
9
u/coopsoup247 Aug 17 '25 edited Aug 17 '25
In addition, the script can also be shortened to this:
EDIT: cleaned up the formatting