ExamVeda
Login
Home
Python Built In Functions
?

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

Answer & Solution
Correct Answer: Option A
The correct answer is Option A: 4.
The len() function in Python is used to get the length of an object, such as a list, tuple, or string. When you pass the list ["hello", 2, 4, 6] to the len() function, it returns the number of elements in the list, which is 4. Therefore, the output will be 4.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.