i want to take the d1 dict and the d2 dict and check if the items in the d2 dict lists exists in the d1 dict no matter in what order.
The way i imagine i would do this is. Take the first list from d2, take the individual items and check if they exist in d1["X"]. I want to return a boolean if all three items in the d2 list is found in d1["x"].
How should i approach this? Thanks in advance for all help.
1
2 d1 = {"x":["A1","A2","A3","B2","C1"], "o":[]}
3
4 d2 = {1:["A1","B1","C1"], 2:["A2","B2","C2"], 3:["A3","B3","C3"],
5 4:["A1","A2","A3"], 5:["B1","B2","B3"], 6:["C1","C2","C3"],
6 7:["A1","B2","C3"], 8:["A3","B2","C1"]}
7
8
9 for x in d2.values():
10 if x in d1["x"]:
11 print(x)