micropython/tests/basics/set_add.py

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

24 lines
216 B
Python
Raw Normal View History

2014-01-12 15:29:11 +00:00
s = {1, 2, 3, 4}
print(s.add(5))
print(sorted(s))
s = set()
s.add(0)
s.add(False)
print(s)
s = set()
s.add(False)
s.add(0)
print(s)
s = set()
s.add(1)
s.add(True)
print(s)
s = set()
s.add(True)
s.add(1)
print(s)