📜  python 测试字典列表是否有键 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:26.653000             🧑  作者: Mango

代码示例1
>>> lod = [{1: "a"}, {2: "b"}]
>>> any(1 in d for d in lod)
True
>>> any(3 in d for d in lod)
False