python列表内字典去重
version > python3.5
tags = [{"value": "A", "key": "hello"},{"value": "A", "key": "world"}]
b = OrderedDict() for item in tags:
b.setdefault(item['value'], {**item, })
tags = list(b.values())
version > python3.5
tags = [{"value": "A", "key": "hello"},{"value": "A", "key": "world"}]
b = OrderedDict() for item in tags:
b.setdefault(item['value'], {**item, })
tags = list(b.values())