Python tiny gems: any and all functions

Python tiny gems: any and all functions

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 :)

$ ./buy-me-a-coffee ☕ // found this useful? I write these in my spare time