2014-04-06 19:28:44 +01:00
|
|
|
els = []
|
|
|
|
d = {1:2,3:4}
|
|
|
|
a = d.popitem()
|
|
|
|
print(len(d))
|
|
|
|
els.append(a)
|
|
|
|
a = d.popitem()
|
|
|
|
print(len(d))
|
|
|
|
els.append(a)
|
2014-01-06 20:08:52 +00:00
|
|
|
try:
|
|
|
|
print(d.popitem(), "!!!",)
|
|
|
|
except KeyError:
|
|
|
|
print("Raised KeyError")
|
|
|
|
else:
|
|
|
|
print("Did not raise KeyError")
|
2014-04-06 19:28:44 +01:00
|
|
|
print(sorted(els))
|
|
|
|
|