mirror of
https://github.com/micropython/micropython.git
synced 2026-05-01 05:10:15 +02:00
b4dea46d8b
With dict being unordered of course.
17 lines
255 B
Python
17 lines
255 B
Python
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))
|
|
|