I have this dictionary:
c = {0: [0, 2, 3], 1: [1, 6, 9]}
and I have this list:
f = [1, 0, 6]
and I want to know for every member in f, what is the key in the dictionary c?
Here is the code I am using to achieve this:
for m, n in c.items():
for k in n:
for l in f:
if k == l:
print(m)
and I get this result:
0
1
1
but I think the result should be:
1
0
1
What can I do to make the result like what I want it to be?
I really appreciate you help.
Thank you.