list intersection

PHOTO EMBED

Wed Mar 09 2022 02:13:43 GMT+0000 (Coordinated Universal Time)

Saved by @lahiruaruna #python

>>> a = [1,2,3,4,5]
>>> b = [1,3,5,6]
>>> list(set(a) & set(b))
[1, 3, 5]
content_copyCOPY

https://stackoverflow.com/questions/3697432/how-to-find-list-intersection