circuitpython/tests/basics/dict-from-iter.py
Paul Sokolovsky be019ce063 objdict: Implement construction from iterable of pairs.
Pairs are limited to tuples so far.
2014-04-11 07:01:15 +03:00

5 lines
120 B
Python

print(dict([(1, "foo")]))
d = dict([("foo", "foo2"), ("bar", "baz")])
print(sorted(d.keys()))
print(sorted(d.values()))