title: jupyter dropdown widget trigger action
body: <p>I have a seemingly simple intention, just have a dropdown widget in jupyter notebook to trigger some simple action. It sort of works, but following script actually seems to trigger the event three times, what am I doing wrong?</p>
  
  <pre class="lang-py prettyprint-override"><code>import ipywidgets as widgets
  from IPython.display import display, clear_output
  vardict = ["var1","var2"]
  select_variable = widgets.Dropdown(
      options=vardict,
      value=vardict[0],
      description='Select variable:',
      disabled=False,
      button_style=''
  )
  def get_and_plot(b):
      clear_output
      print(select_variable.value)
  
  display(select_variable)
  select_variable.observe(get_and_plot)
  </code></pre>
  
  <p>And the output when I select item from dropdown is something like</p>
  
  <pre><code>var1
  var2
  var2
  </code></pre>
  
  <p>and getting longer with each selection. </p>
  
  <p>What I want to get is a way to trigger action (print or something else) only once per selection, how do I achieve this? </p>