What’s the most elegant way of doing something like this:
>>> tests = [false, false, false]
>>> map_or(test)
false
>>> tests = [true, false, false]
>>> map_or(test)
true
The map_or function should return true if one or more of list elements are true.
Use
any(). It is a built-in function that just does what you want.