from functools importreducedefset_list(a):defrun_function(x, y):return x if y in x else x +[y]
uniqueList =reduce(run_function,[[],]+ a)return uniqueList
列表中的字典去重from functools import reducedef set_list(a): def run_function(x, y): return x if y in x else x + [y] uniqueList = reduce(run_function, [[], ] + a) return uniqueList效率还行.