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]))
 
PREVIOUS NEXT
Tagged: #Any #All #Python
ADD COMMENT
Topic
Name
4+7 =