DEV Community

Discussion on: id() in python

Collapse
siddhesh_agarwal profile image
Siddhesh Agarwal Author

The example is talking about re-initialization with same value like this:

a = 150
id1 = id(a)
a = 150
id2 = id(a)
print(id1 == id2)
Enter fullscreen mode Exit fullscreen mode

The above code gives True