Datatype set with id() function, why do we see different address for name and value?
Hello Python Community, I am trying to understand mutable and immutable characteristics of python datatypes. After reading some articles I developed an understanding and wanted to test my understanding using variable and heap view in Thonny. Please go to line 79 to 84 of my code and help me with my problem https://code.sololearn.com/cgaVDzTS02sM/#py Because list, dictionary are mutable. I am should see different addresses if I run id() function for both the name (identifier aka variable) and value (data, here a list or dictionary). This works. I am happy. Because tuple is immutable, I should see same address if I I run id() function for both the name (identifier aka variable) and value (data, here a tuple). This works. I am happy. Just for set, which we know is a immutable datatype, if I run id() function for both the name (identifier aka variable) and value (data, here a set) I get different addresses. Why? I am confused.