I think all
will skip the rest of an array of boolean values as soon as it encounters a False
. Can anyone please confirm the same?
array = [False, True, True ...(1000s of values of True)]
all(array)
The time complexity to run the above set of statements would/should be constant, i.e. O(1), right?