Question: A dictionary stores a collection of ordered items unordered items mutable items immutable items Flag this Question Question 21 pts Each item in a dictionary
A dictionary stores a collection of
Flag this Question
Question 21 pts
Each item in a dictionary is
Flag this Question
Question 31 pts
How many items does the following dictionary contain? flowers = {"red": "rose", "white": "lily", "yellow": "buttercup"}
Flag this Question
Question 41 pts
If each row in a list of lists has exactly two columns, you can convert it to a dictionary by using the
Flag this Question
Question 51 pts
The items() method returns a
| | view object containing all of the values in a dictionary |
| | list object containing all of the values in a dictionary |
| | view object containing all of the key/value pairs in a dictionary |
| | list object containing all of the key/value pairs in a dictionary |
Flag this Question
Question 61 pts
The key in a dictionary can be
Flag this Question
Question 71 pts
The keys() method returns a
| | view object containing all of the keys in a dictionary |
| | list object containing all of the keys in a dictionary |
| | view object containing all of the key/value pairs in a dictionary |
| | list object containing all of the key/value pairs in a dictionary |
Flag this Question
Question 81 pts
To avoid a KeyError when using the pop() method of a dictionary, you can
| | use the optional second argument to supply the correct key |
| | use the optional second argument to supply a default value |
| | use the exists keyword to check whether the key exists before you call the pop() method |
| | use the del keyword to check whether the pop() method can delete the key without a KeyError |
Flag this Question
Question 91 pts
To convert a view object to a list, you can use the
Flag this Question
Question 101 pts
To delete all items from a dictionary you can
| | use the pop() method without any arguments |
| | use the deleteAll() method |
| | use the del keyword on a dictionary item |