Week 3 Unit 2: Self-test

22. October 2024

Question 1

Which of the following statements about dictionaries are correct?

Note: There are 3 correct answers to this question.


Within dictionaries, you can access the elements by index and by key.
Dictionaries are immutable.
It is possible to add and delete key-value pairs from a dictionary.
A tuple can be a key within a dictionary. A list cannot be a key of a dictionary.
Within dictionaries, you can access the elements by key only.


< Previous unit | Next unit > | Course Overview