添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
小眼睛的热带鱼  ·  Python equivalent of ...·  2 月前    · 
俊逸的火锅  ·  Python 控制台 — Blender ...·  1 月前    · 
健身的抽屉  ·  在 Google Cloud 上使用 ...·  1 月前    · 
直爽的黑框眼镜  ·  Difference between ...·  1 月前    · 
谦虚好学的太阳  ·  SVA 纽约视觉 - ...·  2 年前    · 
心软的热带鱼  ·  EasyNVR ...·  2 年前    · 
天涯  ·  snan动漫-snan 做到饭糊动漫·  2 年前    · 
空虚的葡萄酒  ·  Multiple developers ...·  2 年前    · 
edata = [{"resource_id": "test", "operation_status": "change"},
{"resource_id": "test", "operation_status": "create"},
{"resource_id": "test1","operation_status": "change"},
{"resource_id": "test1","operation_status": "delete"}]
new_s = [] # 存储去重后的数据
for x in edata: # 根据字典列表的resource_id做去重操作
if any(str(d.get('resource_id', None)).lower() == str(x['resource_id']).lower() for d in new_s):
pass
else:
new_s.append(x)
print(new_s)