0
Syntax related to "all"
what is the difference between below statement> if all([i > 5 for i in nums]): vs if ([i > 5 for i in nums]): vs if (i > 5 for i in nums):
1 Answer
+ 5
first returns True if all elements > 5
second returns a list like [True, False, True], returns True if list is not empty
third returns a generator, returns True