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