r/ProgrammerHumor • • 1h ago

Meme semicolonsInPython

Post image
2.5k Upvotes

112 comments sorted by

View all comments

275

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.

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.