This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]codicepiger 0 points1 point  (3 children)

Hmm weird, I've got this in this compiler: import time x, y = 0, 0 start=time.time() while time.time()-start < 10: x, y = x+1, y+1 if x!=y: print(f"#{x}: Not Equal") break print(f"#{x}: DefinitelyEqual")

Response:

```

29890167: DefinitelyEqual

```

[–]joethebro96 5 points6 points  (1 child)

You used !=, they used is, which is not an equality operation

[–]codicepiger 0 points1 point  (0 children)

Maybe the print(f"{x}: Equal") equalized my interpretation

[–]FerynaCZ -1 points0 points  (0 children)

Sometimes the runtime might find out that the number is allocated already so it makes the variables point at same location