micropython/tests/basics/set_intersection.py

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

8 lines
162 B
Python
Raw Normal View History

s = {1, 2, 3, 4}
print(sorted(s))
print(sorted(s.intersection({1, 3})))
print(sorted(s.intersection([3, 4])))
print(s.intersection_update([1]))
print(sorted(s))