ExamVeda
Login
Home
Python Built In Functions
?

What does the built-in function type() do in Python?

Answer & Solution
Correct Answer: Option A
The correct answer is Option A: Returns the type of an object.
The type() function in Python is used to get the type of an object. It returns the type of the object passed as an argument. This can be useful for checking the type of variables or objects during runtime.
For example:
x = 10
y = "Hello"
z = [1, 2, 3]

print(type(x))  # Output: 
print(type(y))  # Output: 
print(type(z))  # Output: 
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.