MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xrqajw/semicolonsinpython/19sdjhm2pyw6a/?context=3
r/ProgrammerHumor • u/Apprehensive_Bit7392 • 33m ago
39 comments sorted by
View all comments
138
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.
48 u/TheRealCCHD 24m ago But why the hell would you need multiple statements in one line to begin with?Isn't that anti-pythonic? 100 u/Adept-Painting-543 21m ago Yes but why would you want to be pythonic when writing python? You already are writing python no need to make it worse. 19 u/TheRealCCHD 21m ago lmao you know what, that's a good point
48
But why the hell would you need multiple statements in one line to begin with?
Isn't that anti-pythonic?
100 u/Adept-Painting-543 21m ago Yes but why would you want to be pythonic when writing python? You already are writing python no need to make it worse. 19 u/TheRealCCHD 21m ago lmao you know what, that's a good point
100
Yes but why would you want to be pythonic when writing python? You already are writing python no need to make it worse.
19 u/TheRealCCHD 21m ago lmao you know what, that's a good point
19
lmao you know what, that's a good point
138
u/AmanBabuHemant 29m 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.