Can I make an ipywidget floatslider with a list of values?
<p>I would like to make an ipywidget floatslider, but passing it a list of values, rather than a range and step.  Is there a way to do this, or is making a dropdown widget the only option?</p>

<p>Woops!  You can use SelectionSlider, e.g.:</p>

<pre><code>import ipywidgets as widgets

def test(val):
    print(val)

widgets.interact(test, val=widgets.SelectionSlider(description='value',   options=['1', '50', '300', '7000']))
</code></pre>

<p>This widget wasn't available in my ipywidgets 4.0, so I had to upgrade.  Also, make sure that afterward you run </p>

<pre><code>jupyter nbextension enable --py --sys-prefix widgetsnbextension
</code></pre>

<p>as described in their installation instructions.</p>

python jupyter ipywidgets