circuitpython/tests/basics/set_specialmeth.py

6 lines
96 B
Python

# set object with special methods
s = {1, 2}
print(s.__contains__(1))
print(s.__contains__(3))