circuitpython/tests/basics/set_copy.py
Andrew Scheller 1ff6011abc Modify set tests to print sorted sets directly
instead of creating temporary lists and sorting those in-place
2014-04-07 05:00:03 +01:00

7 lines
84 B
Python

s = {1, 2, 3, 4}
t = s.copy()
s.add(5)
t.add(7)
for i in s, t:
print(sorted(i))