list1 = [2,4,5,6,7,89]
lambdafunction = lambda x: x > 20
print(any(lambdafunction(list1)))
I basically want it to print true or false on the condition x > 20 if any of the numbers in the list are greater than 20. How would I do that using an 'any' function and a lambda? I know how to check for a specific position in the list, but not how to check the whole list.
any(x>20 for x in list1)