Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Any All in Python

# Since all are false, false is returned
print (any([False, False, False, False]))
  
# Here the method will short-circuit at the
# second item (True) and will return True.
print (any([False, True, False, False]))
  
# Here the method will short-circuit at the
# first (True) and will return True.
print (any([True, False, False, False]))
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #Any #All #Python
ADD COMMENT
Topic
Name
6+9 =