Informatics Practices
To create an empty dictionary, we use the statement as:
- d1 = {}
- d1 = []
- d1 = ()
- d1 == {}
Python Dictionaries
2 Likes
Answer
d1 = {}
Reason — The statement to create an empty dictionary in Python is d1 = {}.
Answered By
1 Like
Related Questions
We can create immutable dictionaries in Python.
Which of the statement(s) is/are correct?
- In Python dictionary, the key-value pair is called an item.
- Python dictionary is a mapping of unique keys to values.
- Dictionary is mutable.
- All of these.
In a dictionary, the elements are accessed through:
- key
- value
- label
- None of these
Keys of a dictionary must be:
- Similar
- Unique
- Both (i) and (ii)
- All of these