Python id() function

The id() function in Python returns an id for the specified object where all the objects in has its own unique id.

Syntax

Parameter

object: This parameter represents any object, String, Number, List, Class etc.

Return

This function returns the “identity” of an object.

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This