Source Code:
(back to article)
my_dict = {'a': 1, 'b': 2, 'c': 3} if 'd' not in my_dict: print("Key 'd' does not exist in dictionary") else: print("Key 'd' exists in dictionary")
Result:
Report an issue