Computer Science - Class 12
Chapter 14 - Functions in python

What will be the output of the following code? print (type(type(int)))

(a) type ‘int’

(b) <class ‘type’>

(c) Error

(d) <class ‘int’>

 

Answer:

The type( ) function returns the class type of the object passed as parameter.

So, type(type(int)) will return the class ‘type’.

Therefore, the output will be <class ‘type’> 

So, the correct answer is (b).

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo