Answers for "Write a Python program to find common element(s) in a given nested lists."

0

Write a Python program to find common element(s) in a given nested lists.

>>> p = [[1,2,3], [1,9,9], [1,2,4]]
>>> set.intersection(*map(set, p))
set([1])
>>> ip = iter(p)
>>> s = set(next(ip))
>>> s.intersection(*ip)
set([1])
Posted by: Guest on April-16-2021

Code answers related to "Write a Python program to find common element(s) in a given nested lists."

Python Answers by Framework

Browse Popular Code Answers by Language