A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3schools.com/python/ref_func_id.asp below:

Website Navigation


Python id() Function

Python id() Function

❮ Built-in Functions

Example

Return the unique id of a tuple object:

x = ('apple', 'banana', 'cherry')
y = id(x)

Try it Yourself » Definition and Usage

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.

❮ Built-in Functions

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