2 ms·
I disagree. If lst = [True, True]; all(lst) is True is True, and lst = [True]; all(lst) is True is True, I'd be very surprised by lst = []; all(lst)
by kstrauser 3y ago
I disagree.
If
lst = [True, True]; all(lst) is True
is True, and
lst = [True]; all(lst) is True
is True, I'd be very surprised by
lst = []; all(lst) is False
Basically, all(lst) is the same as `not any(not item for item in lst)`. If we inverted the value of `all([])`, I'd argue that we'd also have to invert the value of `any([])`, which today evaluates as False. `any([]) is True` would be beyond bizarre to me.