Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

What happens when you use the built-in function any() on a list?

Q: What happens when you use the build-in function any() on a list?
A: The any() function returns True if any item in the list evaluates to True. Otherwise, it returns False.

here is an example

if any([True, False, False, False]) == True:
    print('Yes, there is True')
>>> Yes, there is True
 
PREVIOUS NEXT
Tagged: #What #function
ADD COMMENT
Topic
Name
7+5 =