micropython/tests/basics/set_copy.py

9 lines
105 B
Python
Raw Normal View History

2014-01-12 23:56:25 +08:00
s = {1, 2, 3, 4}
t = s.copy()
s.add(5)
t.add(7)
for i in s, t:
l = list(i)
l.sort()
print(l)