接受一个迭代器,如果迭代器的所有元素都为真,那么返回True,否则返回False
所有元素
True
False
In [2]: all([1,0,3,6]) Out[2]: False In [3]: all([1,2,3]) Out[3]: True