micropython/tests/basics/dict_iterator.py

6 wiersze
83 B
Python

d = {1: 2, 3: 4}
els = []
for i in d:
els.append((i, d[i]))
print(sorted(els))