Return True if any element of the iterable is true. Equivalent to: : any « Buildin Function « Python Tutorial






# def any(iterable):
#    for element in iterable:
#        if element:
#            return True
#    return False


print any(['A', '', 'B'])








13.3.any
13.3.1.Return True if any element of the iterable is true. Equivalent to: