English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Explain the following built-in function. id() - Computer Science

Advertisements
Advertisements

Question

Explain the following built-in function.

id()

Answer in Brief

Solution

Function Description Syntax Example
id() id( ) Return the "identity" of an object. i.e. the address of the object in memory.  id (object)
x=15
 y='a' 
print ('address of x is :',id (x)) 
print ('address of y is :', id (y)) 
Output: 
address of x is : 1357486752 
address of y is : 13480736
shaalaa.com
Introduction to Python Functions
  Is there an error in this question or solution?
Chapter 7: Python functions - Evaluation [Page 113]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 7 Python functions
Evaluation | Q 3. (a) | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×