How to define the default value of a Slider widget on ipywidgets?
问题 On a Jupyter Notebook and using ipywidgets I can create sliders using the compact version import ipywidgets as ip def f(x): print(x) ip.interact(f, x = (0, 1, 1)) The slider's default value is 0 but I would like to make it 1. How can I do this? 回答1: The widget abbreviations (using tuples to request sliders, etc.) only expose a small subset of the options that can be passed to a widget. Default values come from the default value in the function definition if available, or the center of the