Suppose d john40 peter45 what happens when retieving a


Suppose d = {"john":40, "peter":45}, what happens when retieving a value using d["susan"]?

a) Since "susan" is not a value in the set, Python raises a KeyError exception.

b) It is executed fine and no exception is raised, and it returns None.

c) Since "susan" is not a key in the set, Python raises a KeyError exception.

d) Since "susan" is not a key in the set, Python raises a syntax error.

Solution Preview :

Prepared by a verified Expert
Computer Graphics: Suppose d john40 peter45 what happens when retieving a
Reference No:- TGS01187611

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)