Computer Science
In a dictionary, the elements are accessed through:
- Key
- Value
- Index
- None of these
Python Dictionaries
2 Likes
Answer
Key
Reason — In a dictionary, elements are accessed using keys, which uniquely identifies each element's associated value.
Answered By
2 Likes
Related Questions
Which function returns the number of elements in the tuple?
- len()
- max()
- min()
- count()
To create an empty dictionary, we use the statement as:
- d1 = {}
- d1 = []
- d1 = ()
- d1 == {}
Keys of a dictionary must be:
- Similar
- Unique
- Both (i) and (ii)
- All of these
To create a new dictionary with no items:
- Dict
- dict()
- d1=[]
- None of these