1(xvi)
What will be the output of the following Python code?
numbers = [10, 20, 30]
print(len(numbers))
- (a)2
- (b)3
- (c)20
- (d)30
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.