Informatics Practices
Keys of a dictionary must be:
- Similar
- Unique
- Both (i) and (ii)
- All of these
Python Dictionaries
2 Likes
Answer
Unique
Reason — Keys of a dictionary must be unique and immutable.
Answered By
1 Like
Related Questions
To create an empty dictionary, we use the statement as:
- d1 = {}
- d1 = []
- d1 = ()
- d1 == {}
In a dictionary, the elements are accessed through:
- key
- value
- label
- None of these
To create a new dictionary with no items:
- Dict
- dict()
- d1={}
- Both 2 and 3
Which function is used to return a value for the given key?
- len()
- get()
- keys()
- None of these