【发布时间】:2021-10-05 18:22:18
【问题描述】:
如果我有这样的字典列表:
[
{'type': 'one', 'other': 'anything'},
{'type': 'one', 'other': 'anything'},
{'type': 'two', 'other': 'anything'},
{'type': 'three', 'other': 'anything'},
{'type': 'four', 'other': 'anything'}
]
等等
获取“类型”的所有唯一值的最佳方法是什么?
【问题讨论】:
-
你发现了什么方法?他们有什么不好?你的代码在哪里? minimal reproducible example?