How do Python's any and all functions work?

后端 未结 8 1564
挽巷
挽巷 2020-11-22 01:13

I\'m trying to understand how the any() and all() Python built-in functions work.

I\'m trying to compare the tuples so that if any value i

8条回答
  •  无人及你
    2020-11-22 01:45

    >>> any([False, False, False])
    False
    >>> any([False, True, False])
    True
    >>> all([False, True, True])
    False
    >>> all([True, True, True])
    True
    

提交回复
热议问题