title: Python tkinter label widget mouse over
body: <p>My objective is to change the text of label widget when the mouse move over the label.For one label i would do something like this:</p>
  
  <pre><code>import Tkinter as tk
  
  def fun1(event):
      label.config(text="Haha")
  def fun2(event):
      label.config(text="Label1")
  
  root=tk.Tk()
  label=tk.Label(root,text="Label1")
  label.grid(row=1,column=1)
  label.bind("&lt;Enter&gt;", fun1)
  label.bind("&lt;Leave&gt;", fun2)
  root.mainloop()
  </code></pre>
  
  <p>But now, i have a bunch of labels which is generated by for loop and a list which contains the text that i want to change.</p>
  
  <pre><code>mylist=['a','b','c','d','e']
  for i in range(5):
      tk.Label(root,text="Label"+str(i)).grid(row=i+1,column=1)
  </code></pre>
  
  <p>This will generate 5 labels with numbers. Is it possible to add mouse over event for each individual label so that when i mouse over on the label 1, it changes to 'a', when i mouse over to label 2, it changes to 'b', etc? FYI, the number of items in the mylist will always be the same with the number used in for loop.</p>