Hi,

I have a single questions regarding id() built-in function.

example 1:

var1 = "some string"
var2 = "some string"

if use the id() function on both, it returns exactly the same address.


example 2:

data = "some string"
var1 = data
var2 = data

if use the id() function on var1 and var2, it returns exactly the same address.


can anyone explain me please why does this happens?   Is this correct?


Thanks in advance and regards,
Fabian

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to