Direction: Choose the correct option
Q1.
What is a dictionary in Python?
Direction: Choose the correct option
Q2.
How do you create an empty dictionary?
Direction: Choose the correct option
Q3.
What is the output of `{'a':1, 'b':2}['a']`?
Direction: Choose the correct option
Q4.
How do you add a new key-value pair to a dictionary `d`?
Direction: Choose the correct option
Q5.
What does `d.get('key', default)` do?
Direction: Choose the correct option
Q6.
How do you remove a key from a dictionary?
Direction: Choose the correct option
Q7.
What is the output of `{'a':1, 'b':2}.keys()`?
Direction: Choose the correct option
Q8.
Can a dictionary have duplicate keys?
Direction: Choose the correct option
Q9.
Which of the following can be a dictionary key?
Direction: Choose the correct option
Q10.
What does `d = {}.fromkeys(['a','b'], 0)` create?
