micropython/tests/basics/set_add.py

6 lines
63 B
Python

s = {1, 2, 3, 4}
print(s.add(5))
l = list(s)
l.sort()
print(l)