3 ms·
And 110 is probably an interned int, so a and b are likely referencing an object that was compiled into the interpreter.
by dekhn 13y ago
And 110 is probably an interned int, so a and b are likely referencing an object that was compiled into the interpreter.
- icebraining 13y agoYeap: >>> a = 110 >>> b = 110 >>> id(a) == id(b) True
- deleted 13y ago[deleted]
- icebraining 13y agoUh, I didn't use assignment between variables; my code is the same as your second example (both variables independently assigned to 110).
- taejo 13y agoIndeed; I was confused by the dekhn's aside.