Apr 6, 2014
Highest (Greatest) Common Element Among Two Lists In Python
>>> from collections import Counter >>> xs = [1, 3, 5, 7, 9, 15, 45] >>> ys = [7, 8, 9, 15, 1, 1, 2] >>> max(list((Counter(xs) & Counter(ys)).elements())) 15
seen from China

seen from Australia
seen from South Korea
seen from China
seen from South Korea
seen from South Korea

seen from Singapore
seen from Brazil
seen from United States
seen from China
seen from Türkiye

seen from Türkiye

seen from Türkiye

seen from United States
seen from Türkiye

seen from Italy
seen from China
seen from Iraq
seen from Türkiye
seen from Malaysia
Highest (Greatest) Common Element Among Two Lists In Python
>>> from collections import Counter >>> xs = [1, 3, 5, 7, 9, 15, 45] >>> ys = [7, 8, 9, 15, 1, 1, 2] >>> max(list((Counter(xs) & Counter(ys)).elements())) 15