title: Python Tk Multiple Buttons Creation Problem
body: <p>I'm creating ten buttons and the button texts are labelled 1 to 10. The following code creates 10 buttons and labels correctly. But it's printing 9  as the output for all the buttons. What I expect it to do is to print the corresponding number of the Button to screen, So for Example if the user presses  Button 2 then it should print 2. </p>
  
  <pre><code>def create():
  for i in range (1,10):
      lst.insert(i,Button(text=i,command=lambda: prnt(i)).pack())
  </code></pre>
  
  <p>(Note: 'prnt(i)' is a function that simply prints the value i has.
         'lst' is a list that stores the created buttons.)</p>
  
  <p>From the output I can say that the program is using the latest i value as the argument for the function when user presses a button, So how would I solve this without having to write 10 lines of code for each buttons. </p>