PythonExtra/tests/basics/dict_copy.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
100 B
Python
Raw Permalink Normal View History

a = {i: 2*i for i in range(100)}
2014-01-06 19:11:20 +01:00
b = a.copy()
for i in range(100):
2014-01-06 19:11:20 +01:00
print(i, b[i])
print(len(b))