I'm trying to write a code which checks if 2D-array (consists of only boolean) has at least one True and return True if there is at least one True.
I tried using all() function but couldn't come up with a solution. I assume what I need is opposite of what all() function does.
>>> array1 = [[True, False], [False, False]]
>>> all([all(row) for row in array1)
False # This should be True
>>> array2 = [[False, False], [False, False]]
>>> all([all(row) for row in array2)
False # This is correct but this and array with all True is only working case.
For array1 = [[True, False], [False, False]], I expect the output to be True since there is one True at array1[0][0].