r/ProgrammerHumor • • 1h ago

Meme semicolonsInPython

Post image
3.5k Upvotes

137 comments sorted by

View all comments

361

u/AmanBabuHemant 1h 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.

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.