Python Programming - Data Types - Discussion

Discussion Forum : Data Types - General Questions (Q.No. 52)
52.
What is the output of the following code snippet?
my_dict = {'a': 1, 'b': 2, 'c': 3}
result = 'b' in my_dict
print(result)
True
False
2
Error
Answer: Option
Explanation:
The in keyword checks if the specified key is present in the dictionary.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.