What is the output of the following code:
my_list = [True, False, True]
print(any(my_list))
print(any(my_list))
A. TRUE
B. [True, False, True]
C. FALSE
D. Error
Answer: Option A
Solution (By Examveda Team)
The any() function in Python returns True if at least one element of the iterable is true, otherwise it returns False.In the provided code, the list [True, False, True] contains at least one True value, so the any() function returns True.

Join The Discussion