Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python any( in list FOR LOOP

>>> names = ['King', 'Queen', 'Joker']
>>> any(n in 'King and john' for n in names)
True

>>> all(n in 'King and Queen' for n in names)
False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #list #FOR #LOOP
ADD COMMENT
Topic
Name
5+1 =