a = 2j
print(id(a))
In this, the id(a) returns different value each time I run the program. What is the reason behind this?
On the other hand,
a = 2
print(id(a))
That variation is not seen with the above code where a = 2 refers to an integer and not complex number.