increment/decrement operators
Robin Koch
robin.koch at t-online.de
Sat Dec 5 07:56:47 EST 2015
Am 05.12.2015 um 13:40 schrieb Tony van der Hoff:
> Hi,
>
> I'm a relative newbie to python, and this NG, but it's certainly growing
> on me.
>
> One thing I'm missing is the increment/decrement operator from C, ie
> x++, and its ilk. Likewise x += y.
>
> is there any way of doing this in Python?
Quick answer:
x += y works. (Well, it should.)
x++ doesn't.
Long answer:
I'm sure someone more experienced will come up with one shortly. :-)
Until then I found this:
http://stackoverflow.com/a/1485854
--
Robin Koch
More information about the Python-list
mailing list