1. Home
  2. Data Science
  3. Python
  4. What will be the result of len(['apple', 'banana'…

Added 4 May 2024

What will be the result of len(['apple', 'banana', 'orange']) in Python?

  1. 3 Correct answer
  2. 6
  3. 7
  4. Error

Correct answer

A. 3

15 views

MCQSEXAM

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

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs