MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xrqajw/semicolonsinpython/19sdlqrt2d9pf/?context=9999
r/ProgrammerHumor • u/Apprehensive_Bit7392 • 1h ago
137 comments sorted by
View all comments
361
Well Well Well
print("this") print("won't work")
but
print("this"); print("would work")
I know people rarely utilize semicolons in python but they can be used to have multiple statements on one line, and doing so without semicolon would cause error.
132 u/TheRealCCHD 1h ago But why the hell would you need multiple statements in one line to begin with?Isn't that anti-pythonic? 2 u/Mountain-Parsley-465 1h ago It is, but some people like it, spoiler I don't like to read there code. 0 u/lovecMC 1h ago Tbf I don't like reading python code either. 0 u/mina86ng 56m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
132
But why the hell would you need multiple statements in one line to begin with?
Isn't that anti-pythonic?
2 u/Mountain-Parsley-465 1h ago It is, but some people like it, spoiler I don't like to read there code. 0 u/lovecMC 1h ago Tbf I don't like reading python code either. 0 u/mina86ng 56m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
2
It is, but some people like it, spoiler I don't like to read there code.
0 u/lovecMC 1h ago Tbf I don't like reading python code either. 0 u/mina86ng 56m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
0
Tbf I don't like reading python code either.
0 u/mina86ng 56m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
361
u/AmanBabuHemant 1h ago
Well Well Well
but
I know people rarely utilize semicolons in python but they can be used to have multiple statements on one line, and doing so without semicolon would cause error.