Python ipywidgets checkbox events
问题 I am using ipywidgets.widgets.Checkbox. Is there any way to handle the checkbox events? Please do help. I am a beginner. edit: How to create a list of checkboxes? 回答1: There aren't any direct events but you can use the observe event. That will likely create more events than you want so you may want to filter them down to one. from IPython.display import display from ipywidgets import Checkbox box = Checkbox(False, description='checker') display(box) def changed(b): print(b) box.observe