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())

 

相关文章: