Python tiny gems: any and all functions

Scenario: We need to check if any of the list elements is True

Python tiny gems: any and all functions
Photo by David Clode on Unsplash

Scenario: We need to check if any of the list elements is True>> x = [True,False,False]
>> print(any(x))
True

Scenario: We need to check if all the list elements are True>> x = [True,True,True]
>> print(all(x))
True

Simple but cool functions :)