English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

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

Advertisements
Advertisements

Question

Explain the following built-in function.

type()

Answer in Brief

Solution

Function Description Syntax Example
type ( ) Returns the type of object for the given single object. type (object)
X = 15.2 
y = 'a' 
s = True 
print (type (x)) 
print (type (y))
 print (type (s)) 
Output:
<class 'float'>
<class 'str'>
<class 'bool'>
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. (d) | Page 113
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×