What will be the output of the following Python code?
d = {"a": 1, "b": 2, "c": 3}
d.pop("b")
print(d)
print(d.popitem())
print(d)
A) {"a": 1, "c": 3}
("c", 3)
{"a": 1}
B) {"a": 1, "c": 3}
("a", 1)
{"c": 3}
C) {"a": 1, "b": 2}
("c", 3)
{"a": 1, "b": 2}
D) KeyError
Answer:
Answer by student
The rest of the post is locked. Join Teachoo Black to see the full post.