I have this array a = ["one", "two"] and I want to match these values in dictionary I have which looks like this
b = {one: "something", two: "something2", three: "something3"}
I want to match this key and remove the keys from the dictionary
In the end it will be something like this
{'three': 'something3'}
what I have tried is this
for t in a:
b = b.pop(t, None)
return b
Just want to know if there is a better way to do this