This causes me a headache, and it's hard for me to find a solution with a for loop.
Basically, my data looks like this:
short_list = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12] ] long_list = [ [1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [6, 7, 8, 9, 10], [9, 10, 11, 12, 13] ]
I need to know how many times each number from each row in short_list appears in each row of long_list, and a comparison is NOT needed when both indexes on the list are the same because they come from the same dataset.
Example: I need to know the amount of each number in [1, 2, 3] on the long_list [2, 3, 4, 5, 6], [6, 7, 8, 9, 10] and [9, 10, 11, 12, 13]. Then go to the next row of data in short_list, etc.