MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which of the following is the use of id() function in python?
A
Id returns the identity of the object
B
Every object doesn’t have a unique id
C
All of the mentioned
D
none of above
Explanation: 

Detailed explanation-1: -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.

Detailed explanation-2: -Answer: The id( ) function is an in-built function which returns a unique id for the specified object. All objects in python has its own unique id. So, the correct answer is (a).

Detailed explanation-3: -The id() method returns a unique integer (identity) of a passed argument object.

There is 1 question to complete.