Python-Quizzes | Python List Quiz | Question 11

Question 11: Find the output of the following program:

filter_none

edit
close

play_arrow

link
brightness_4
code

list = [1, 2, 3, None, (1, 2, 3, 4, 5), ['Geeks', 'for', 'Geeks']] 
print(len(list))

chevron_right


(A) 12
(B) 11
(C) 6
(D) 22


Answer: (C)

Explanation: The beauty of python list datatype is that within a list, a programmer can nest another list, a dictionary, or a tuple. Since in the code, there are 6 items present in the list the length of the list is 6.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.