Entering the following code into Python 3.5 shell gives me an answer I didn't expect, very basic I know but would somebody help me with an explanation please.
>>> x = 5
>>> y = 2
>>> a = x*y
>>> x,y,a
(5, 2, 10)
>>> x = 3
>>> x,y,a
(3, 2, 10)
These were all on separate lines each preceded by >>>
I expected 6, but the "new" x has not been used.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…