I\'m trying to understand how the any()
and all()
Python built-in functions work.
I\'m trying to compare the tuples so that if any value i
list = [1,1,1,0]
print(any(list)) # will return True because there is 1 or True exists
print(all(list)) # will return False because there is a 0 or False exists
return all(a % i for i in range(3, int(a ** 0.5) + 1)) # when number is divisible it will return False else return True but the whole statement is False .