I have two lists:
targets = [ [ [4.88], [2.76], [0.4] ], [ [2.6], [2.12], [7.4], [0.2] ] ]
multiples = [ [ [4.2, 3.6, 6.3], [3.5, 2.5], [7.3, 0.5] ], [ [3.6, 0.3], [5.2, 8.6, 3.7], [3.6, 0.4], [2.3, 6.4] ] ]
For every entry in the first list, there are multiple entries in the second one. Now I want to compare these numbers and count the accurences of the numbers that are lower than the traget number. I tried the following, but I don't know how I can compare one single value with multiples and how to refer simultaniously to them.
for element in targets:
tmp = []
for item in element:
tmp2 = []
if item > multiples
The output should be something like this:
[ [ [2], [1], [0] ], [ [1], [0], [2], [0] ] ]
Does somebody know a solution?