1from pyb import Switch
2
3sw = Switch()
4print(sw())
5sw.callback(print)
6sw.callback(None)
7