←
diridBuilt-in
Returns the unique integer identity of an object.
Syntax
id(object)Example
Enter values below to update the example in real time.
copy→print→id→a = [1, 2, 3]
b = a
c = a.copy()
print(id(a) == id(b)) # True (같은 객체)
print(id(a) == id(c)) # False (다른 객체)