Check sibling questions

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).

  1. Computer Science - Class 12
  2. Chapter 14 - Functions in python

About the Author

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