如何在此列表中找到重复项的数量。
>>> result = SiteTags.objects.values('content_type','object_id')
>>> result
[{'object_id': 1, 'content_type': 46}, {'object_id': 1, 'content_type': 46}, {'object_id': 2, 'content_type': 42}]
有没有办法在查询中查找?或通过其他方式?
谢谢!
Counter
不支持 Python 2.6。 - Ahsan