May-05-2017, 06:44 AM
(May-03-2017, 10:39 AM)buran Wrote:(May-03-2017, 10:34 AM)idontreallywolf Wrote: because x = e += 1 is same as
x = e = e + 1
actually, the first one is invalid syntax and rise SynatxError,
while second one is perfectly fine
e = 10 x = e = e + 1 print x print e
Output:11 11
Then why would
x = e += 1
be invalid if its the same as x = e = e + 1
?