Concept

Python id() Function

In Python, the id() function returns the exact address of a referenced object in memory. This unique integer identity can be used to verify if two variables point to the identical memory location or to demonstrate when an operation, such as variable reassignment, causes new memory to be allocated instead of updating the object in-place.

0

2

Updated 2026-05-01

Tags

Python Programming Language

Data Science

D2L

Dive into Deep Learning @ D2L

Related