You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
255 B
16 lines
255 B
els = []
|
|
d = {1:2,3:4}
|
|
a = d.popitem()
|
|
print(len(d))
|
|
els.append(a)
|
|
a = d.popitem()
|
|
print(len(d))
|
|
els.append(a)
|
|
try:
|
|
print(d.popitem(), "!!!",)
|
|
except KeyError:
|
|
print("Raised KeyError")
|
|
else:
|
|
print("Did not raise KeyError")
|
|
print(sorted(els))
|
|
|
|
|