EasyOutput prediction

pop() with a default on missing key

What does this code print?

d = {"a": 1, "b": 2}
val = d.pop("c", -1)
print(val)
print(d)

← → arrow keys to navigate

Sign in to save your progress.