L
LuciferLeo
given i = 0,
I know i = i + 1 and i += 1 are all correct
but when I type:the interpreter replies:
File "<stdin>", line 1
i++
^
SyntaxError: invalid syntax
so I get the idea that suffix ++ is invalid in python
but when I input:and the interpreter replies
0
Don't you think it is misleading when you expect a variable to
increment?
I know i = i + 1 and i += 1 are all correct
but when I type:the interpreter replies:
File "<stdin>", line 1
i++
^
SyntaxError: invalid syntax
so I get the idea that suffix ++ is invalid in python
but when I input:and the interpreter replies
0
Don't you think it is misleading when you expect a variable to
increment?