from functools import reduce
all_tomorrow_Data = [{'a':1},{'a':1}]
filter_function = lambda x, y: x if y in x else x + [y]
all_tomorrow_Data_set = reduce(filter_function, [[], ] + all_tomorrow_Data)
注意:这种方法适用于list比较小的情况,如果list里面有几万个数据,这种方法亲测无效。
若列表中数据较多,建议存到mongodb后,再去重。参考:https://blog.youkuaiyun.com/xiongzaiabc/article/details/81183883