Lists in Python evaluate to True if and only if they are not empty (see, for example, this ).
all returns True if and only if each of the elements of its argument is True .
In the first example, your list is empty, and all returns True .
In the second example, only the list item is an empty list that evaluates to False , so all returns False .
For all other examples, only the list item contains additional lists and, therefore, is not empty and takes the value True , so all should return True .
source share