I have written two multiple choice questions (MCQs) about Python dictionaries. Some of the key concepts associated with Python dictionaries are given in the excellent concept map by Jeremiah Lant.
"_hello_world_"
-1
("alice", "bob")
["alice"]
d = {"A":8, "B":5}
. The statement d["A"] = "Hello"
will:
"A":"Hello"
to the dictionary."A"
such that the key-value pair "A":8
becomes "A":"Hello"
"A"
with the value "Hello"
to form a list of values, such that the key-value pair "A":8
becomes "A":[8, "Hello"]
.Any feedback would be greatly appreciated.