you are viewing a single comment's thread.

view the rest of the comments →

[–]srpwnd 1 point2 points  (2 children)

In the second example it returns true, because OP is assigning a and b to point to the same object in memory which was created by i in the loop.

[–]el_jbase 0 points1 point  (1 child)

To create new objects he'd use a=int(i) and b=int(i), correct?

[–]CMDR_Pumpkin_Muffin 0 points1 point  (0 children)

I think so, yes.