logo CodeStepByStep logo

dict_mystery

Language/Type: Python dict collections

What is the output of the following code? For the purposes of this problem, assume that the dictionary will print with its keys in sorted order.

map = {}
map["K"] = "Schwarz"
map["C"] = "Lee"
map["M"] = "Sahami"
map["M"] = "Stepp"
del map["Stepp"]
del map["K"]
map["J"] = "Cain"
del map["C, Lee"]
print(map)
output
(order shuffled)

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.