Home >>Python Built-in Functions >Python id() Function
Python id() function is used to return a unique id for the given input object. All the objects in the Python has its own unique id. This id is assigned to the object when it is created.
Syntax:Parameter | Description |
---|---|
object | This parameter defines any object, String, Number, List, Class etc. |
x = ('Ravi', 'Aman', 'Rohit')
y = id(x)
print(y)
x = 55
y = id(x)
print(y)