Displaying an object's location, type and value. : id « Buildin Function « Python Tutorial






integer1 = "1"
print "integer1: ", id( integer1 ), type( integer1 ), integer1 

integer1 = int( integer1 )   
print "integer1: ", id( integer1 ), type( integer1 ), integer1

integer2 = "2"
print "integer2: ", id( integer2 ), type( integer2 ), integer2

integer2 = int( integer2 )   
print "integer2: ", id( integer2 ), type( integer2 ), integer2

sum = integer1 + integer2   
print "sum: ", id( sum ), type( sum ), sum








13.24.id
13.24.1.access the identity
13.24.2.whether objects are being changed
13.24.3.lists can be modified without replacing the original object
13.24.4.Displaying an object's location, type and value.