How do Python's any and all functions work?

后端 未结 8 1663
挽巷
挽巷 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 02:06

    s = "eFdss"
    s = list(s)
    all(i.islower() for i in s )   # FALSE
    any(i.islower() for i in s )   # TRUE
    

提交回复
热议问题