r/ProgrammerAnimemes • • Feb 28 '22

It really does though

1.3k Upvotes

38 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Mar 01 '22

[deleted] — view deleted comment

2

u/copperfield42 Mar 01 '22

The semi colon at the end makes it not python

well yeah, but you can also use semi colon in python in order to put two (or more) instructions in the same line that otherwise you put in two lines (with the same indentation level), for example

def fun():print(1);print(2);return 0;

is a valid python code, tho the normal use case for it is more to pass code via command line in string form to the unittest module or something like that.

So in short, it can also be python (If you want to be obtuse with it I guess :p)