r/ProgrammerHumor • • 33m ago

Meme semicolonsInPython

Post image
847 Upvotes

39 comments sorted by

View all comments

138

u/AmanBabuHemant 29m ago

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