6
Question Question 6
Which of the following types qualify to be the keys of a dictionary?
- String
- tuple
- Integer
- float
- list
- dictionary
The following types can be used as keys of a dictionary because they are immutable:
- String
- tuple
- Integer
- float
As lists and dictionaries are mutable so they cannot be used as keys of a dictionary.