#delete 'a' and 'b' d = {'a':1,'b':2,'c':3,'d':4} if 'a' and 'b' in d: del d['a'] del d['b'] print(d)