circuitpython/tests/basics/dict_get.py

4 lines
65 B
Python

for d in {}, {42:2}:
print(d.get(42))
print(d.get(42,2))