如何在Python中比较多个数组

2024-11-08 14:49:50
推荐回答(1个)
回答1:

>>> out = set()
>>> list(out.union(list1, list2, list3))
# ----------------------------------------------------
# Modified according to comment
>>> from statistics import mode
>>> out = [mode(items) for items in zip(list1, list2, list3)]