I have a strange problem so I'll just demo it for you to make it easier to understand. I have two lists:
>>> a = [1, 2, 20, 6, 210]
>>> b = [20, 6, 1]
The result I'm looking for is 3 (position of last matching item in list a based on matches in b)
b always has less data as it contains all duplicates of list a. I want to know what item in B matches the furthest in list a. So in this example, it would be 6 as 6 is furthest in the list of A.
Is there an easy way to do this - my initial approach is a nested loop but I suspect there's a simpler approach?