ID Function in Python

Level 115 keystrokes

This uses id() to get the identity of an object: an integer that is unique among objects existing at the same time. The value changes between runs.

Python code

# id() returns an integer that identifies the object; in CPython it is the memory address
# The number differs from run to run, so your output will not match this example
1print(id("hi"))

Output

140234567890
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Python code and how often they appear.

  • "× 2
  • (× 2
  • )× 2

More Python examples at level 1

← Python typing practice