What will be the output of the following Python code?

ICSE Class 10 Robotics & AI PYQ · 2027 Specimen · Section A

1(xvi)1 Mark · 2027 · Section A · 2027 Specimen

What will be the output of the following Python code?

numbers = [10, 20, 30]
print(len(numbers))
Show SolutionHide Solution↓

3

Reason — The list numbers contains three elements — 10, 20 and 30. The function len() returns the number of elements present in the list, not their values.

← Previous questionNext question →

Browse the free Robotics & AI sample bank