python-检查列表中 字典values是否存在

app_list = []
system_dict = {
    "name": "11",
    "x": 2
}

for i in range(2):
    if not any(d['name'] == '11' for d in app_list):
        app_list.append(system_dict)

print(system_dict)

  

posted @ 2022-06-17 15:36  wanghhhh  阅读(124)  评论(0)    收藏  举报