if list is null python apply any function site:stackoverflow.com code example Example: if list is null python apply any function site:stackoverflow.com >>> any([]), all([]) (False, True)