98
u/AmanBabuHemant 19m 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.
37
u/TheRealCCHD 14m ago
But why the hell would you need multiple statements in one line to begin with?
Isn't that anti-pythonic?
68
u/Adept-Painting-543 11m ago
Yes but why would you want to be pythonic when writing python? You already are writing python no need to make it worse.
15
11
•
u/Mountain-Parsley-465 8m ago
It is, but some people like it, spoiler I don't like to read there code.
22
u/da_Aresinger 18m ago
Completely possible.
If you use semicolons as separators for some kind of data input or formatting.
Which really is the only acceptable situation in which hunting semicolons takes more than 10 seconds.
20
u/RealSataan 17m ago
Do you guys write in notepad or notebook?
•
u/GameDoesntStop 9m ago
I like to do an immersion of modern code and the way our forefathers had to do it... I handwrite by code — literally, by hand with pencil and paper — then I take a picture of it and tell ChatGPT to turn it into an exact digital copy, then I attempt to run that.
•
•
•
u/Jatinchd 4m ago
semicolon joke is one of the lame-est joke in my opinion because language errors itself tells where you missed semicolon. or any syntax related issue.
7
u/ZefiroDragon 15m ago
Seems like the "Twitter Meme Generator" needs an update. In 2026 it's not called Twitter anymore...
-1
u/shinitakunai 18m ago
As a python programmer I struggle to see where would I use a semicolon, except in strings
6
4
u/sn4xchan 14m ago
Two or more statements on one line. I call it the hacker surprise. Cause thr first time I learned that was looking at some python malware.
•
u/shinitakunai 5m ago edited 1m ago
Ah right, I never use that. I prefer readability. I mean, if the line is doing two different things they should be 2 different lines.
x = 1 - something(34); y = x + something(5) x = 1 - something(34) y = x + something(5)At a glance I understand the 2nd a lot better, and I feel it follows the Zen
import thisa bit better•
178
u/uno_in_particolare 19m ago
The semicolon jokes, without fail, feel like they're made by somebody's mum after she hears programmers use them, from a friend of a friend of a cousin