Computer Science, asked by swatisissantilass, 2 months ago

Which of the following is the use of id() in python?​

Answers

Answered by Equestriadash
8

The purpose of using the id() method is to return the ID/identity of a stored value.

For example:

>>> id(78)

1435413632

  • This means that 1435413632 is the identity of the number '78'.

>>> id("Hello")

64295168

  • 64295168 is the identity of the string 'Hello'.

The address is the unique identity of the object.

Similar questions