title: How to display multiple labels that open different hrefs with tkinter?
body: <p>I have the following code but when no matter what label i click it always opens &quot;bing.com&quot;(last link in tuple). How can i open different links based on the label i click?</p>
  <pre><code>from tkinter import *
  import webbrowser
  root = Tk()
  
  def callback(url):
      webbrowser.open_new(url)
  
  qtextnlinks = (('apple', 'google.com'), ('orange', 'bing.com'))
  for label_text, url in qtextnlinks:
      print(label_text,url)
      label_p = Label(root, text=label_text, fg=&quot;blue&quot;, cursor=&quot;hand2&quot;)
      label_p.pack()
      label_p.bind(&quot;&lt;Button-1&gt;&quot;, lambda e: callback(url))
  
  root.mainloop()
  </code></pre>