any and all in python3

Solutions on MaxInterview for any and all in python3 by the best coders in the world

showing results for - "any and all in python3"
Alonso
26 Sep 2019
1# Here all the iterables are True so all 
2# will return True and the same will be printed 
3print (all([True, True, True, True])) 
4  
5# Here the method will short-circuit at the  
6# first item (False) and will return False. 
7print (all([False, True, True, False])) 
8  
9# This statement will return False, as no 
10# True is found in the iterables 
11print (all([False, False, False])) 
12