Return the unique id of a tuple object:
x = ('apple', 'banana', 'cherry')
y = id(x)
The id()
function returns a unique id for the specified object.
All objects in Python has its own unique id.
The id is assigned to the object when it is created.
The id is the object's memory address, and will be different for each time you run the program. (except for some object that has a constant unique id, like integers from -5 to 256 in some versions of Python).
Syntax Parameter Values Parameter Description object Any object, String, Number, List, Class etc.Track your progress - it's free!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4