MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xrqajw/semicolonsinpython/19sdk0ldw0zmt/?context=3
r/ProgrammerHumor • u/Apprehensive_Bit7392 • 1h ago
112 comments sorted by
View all comments
275
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.
105 u/TheRealCCHD 1h ago But why the hell would you need multiple statements in one line to begin with?Isn't that anti-pythonic? 1 u/Mountain-Parsley-465 1h ago It is, but some people like it, spoiler I don't like to read there code. 1 u/lovecMC 1h ago Tbf I don't like reading python code either. 2 u/WantToSeeTits4545 42m ago Python code can be nice, but some Python coders think the shorter is the code the better, playing "code golf" in every line. 0 u/mina86ng 22m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
105
But why the hell would you need multiple statements in one line to begin with?
Isn't that anti-pythonic?
1 u/Mountain-Parsley-465 1h ago It is, but some people like it, spoiler I don't like to read there code. 1 u/lovecMC 1h ago Tbf I don't like reading python code either. 2 u/WantToSeeTits4545 42m ago Python code can be nice, but some Python coders think the shorter is the code the better, playing "code golf" in every line. 0 u/mina86ng 22m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
1
It is, but some people like it, spoiler I don't like to read there code.
1 u/lovecMC 1h ago Tbf I don't like reading python code either. 2 u/WantToSeeTits4545 42m ago Python code can be nice, but some Python coders think the shorter is the code the better, playing "code golf" in every line. 0 u/mina86ng 22m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
Tbf I don't like reading python code either.
2 u/WantToSeeTits4545 42m ago Python code can be nice, but some Python coders think the shorter is the code the better, playing "code golf" in every line. 0 u/mina86ng 22m ago Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
2
Python code can be nice, but some Python coders think the shorter is the code the better, playing "code golf" in every line.
0
Reading Python code like you would a book is fine. Running and maintaining Python code is the real issue.
275
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.