dd5d7c86d2
This can be enforced by pre-commit, but correct it separately to make it easier to review.
12 lines
189 B
Python
12 lines
189 B
Python
d = {}
|
|
print(d.setdefault(1))
|
|
print(d.setdefault(1))
|
|
print(d.setdefault(5, 42))
|
|
print(d.setdefault(5, 1))
|
|
print(d[1])
|
|
print(d[5])
|
|
d.pop(5)
|
|
print(d.setdefault(5, 1))
|
|
print(d[1])
|
|
print(d[5])
|