Run
input = { 'foo': 12, 'bar': 14, 'moo': 16 } output = {key: value for key, value in input.items() if 'o' not in key} print(output)
Output