What will be the output of the following Python function?
all([2,4,0,6])
all([2,4,0,6])A. Error
B. True
C. False
D. 0
Answer: Option C
Solution (By Examveda Team)
The correct answer is Option C: False.The
all() function in Python returns True if all elements of the iterable are true, and False otherwise. In this case, the iterable is [2,4,0,6][2,4,0,6]. Since the element 0 evaluates to False in a Boolean context, the function will return False. Therefore, the output of the function call all([2, 4, 0, 6]) will be False. 
Join The Discussion