Python Programming - Data Types - Discussion

Discussion Forum : Data Types - General Questions (Q.No. 57)
57.
What will be the output of the following code snippet?
my_dict = {'a': 1, 'b': 2, 'c': 3}
result = len(my_dict)
print(result)
{'a': 1, 'b': 2, 'c': 3}
3
6
Error
Answer: Option
Explanation:
The len() function returns the number of items (key-value pairs) in the dictionary.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.