Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果有超过 1 个不同长度的列表,在每个列表中找出相同项目的快速方法是什么?
a = [[1, 2, 3], [2, 3], [3, 4, 5, 6, 7]] s = set.intersection(*map(set, a))
s是具有单个元素的集合3。
s
3