What will be the result of len(['apple', 'banana', 'orange']) in Python?
-
A
3
Correct answer
-
B
6
-
C
7
-
D
Error
15 views
Explanation
The len() function returns the number of elements in a list, so the result is 3.
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ