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