主页
Python
Python all() 函数
demo_ref_all_dict
运行 ❯
×
更改方向
保存代码
更改主题
mydict = {0 : "Apple", 1 : "Orange"} x = all(mydict) print(x) # Returns False because the first key is false. # For dictionaries the all() function checks the keys, not the values.
False