I have two lists
a = [1.1, 2.2, 5.6, 7.8,7.8, 8.6,10.2]
b = [2.2, 1.4, 1.99, 7.88, 7.8]
I want both lists to be compared and the indices of entities which delivered the same value with reference to the list a. There can be multiple hits in list a.
The results is
c= [1,3,4] # with reference to a as 2.2 occur at location 1, 7.8 at location 3 and 4.
I found a similar question but for case the multiple hits were not captured! and the first accepted answer does not print the indices! There is no print in the loop.
compare two lists in python and return indices of matched values
regards,