when using help(all), it returns:
all(iterable)=>bool
return True if bool(x) is True for all values x in the iterable.
if the iterable is empty, return True
help(bool) returns:
bool(x) -> bool
|
| Returns True when the argument x is true, False otherwise.
| The builtins True and False are the only two instances of the class bool.
| The class bool is a subclass of the class int, and cannot be subclassed.
when trying:
>>>bool()
False
>>>all([])
True
my question is, in case that all's input is the empty list/dict/tuple(i.e. iterator), what's passed to bool?? and how come it returns True, as it's dependent on bool?
allas "no-False". An empty iterable contains noFalse-y values, soallreturnsTrue.