I am trying to check if an item in list 1 is present in list 2 and return a list of values based on items in list 3.
List1: [zero, two, three, four, five, seven]
List2: [one, zero, five, three, six]
The returned list should be: [1,0,7,0,4,0]
My code is listed below, but my returned list is wrong. Can anyone find my error?
Update: I have changed the code to simplify it, but I still don’t end up with a useful result: