what is the difference between [("a" and "b") not in a] and [(("a" not in a) and ("b" not in a))]?

Viewed 22

Assume dict dic={"a":1}

("a" and "b") not in dic = True

while

(("a" not in dic) and ("b" not in dic)) =False

My guess is something with not as after I removed it both equation have the same behavior, but even after reading some docs I cannot see why. What I want to achieve is the second behavior, what is the proper way to do it without using 2 in?

0 Answers
Related