I have the following two lists:
A = ['a', 'b', 'c', 'd', 'e', 'f', 'g']
B = ['b', 'd', 'f', 'g']
Of which I want to check if elements of B are in Athen 0 else 1. The expected output should be like this:
{'C': [0, 1, 0, 1, 0, 1, 1]}
I tried the following but didn't get what I am expecting.
{'C': [int(i == j) for j in A] for i in B}