blob: 184735cde6a8cf6276296d58b97bc1b4ecc5eb5c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
d={1:2,3:4}
print(d.popitem())
print(d)
print(d.popitem())
print(d)
try:
print(d.popitem(), "!!!",)
except KeyError:
print("Raised KeyError")
else:
print("Did not raise KeyError")
|