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.
長さが異なるリストが複数ある場合、各リストで同じアイテムをすばやく見つける方法は何ですか?
a = [[1, 2, 3], [2, 3], [3, 4, 5, 6, 7]] s = set.intersection(*map(set, a))
sは単一の要素を持つセット3です。
s
3