I am new to python, that’s why I am struggling with pretty basic question I think. I have two lists:
a = [0, 1, 2, 3, 4, 5, 6, 7]
b = [1, 2, 5, 6]
On the output I need to get all the intersections between them:
c = [[1, 2], [5, 6]]
What’s the algorithm for that?
You can use difflib.SequenceMatcher for this purpose