ExamVeda
Login
Home
Introduction to Python
?

What will be the output of the following Python function?
len(["hello",2, 4, 6])

Answer & Solution
Correct Answer: Option C
The len() function returns the number of items in an object.
Here, we have a list ["hello", 2, 4, 6].
The list contains 4 items: a string, two integers, and another integer.
Therefore, the output of len(["hello", 2, 4, 6]) will be 4.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.