Advertisement
rdrewd-facebook

tkcounter.py

Jun 24th, 2014
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. import sys
  2. from tkinter import *
  3. def print_function(n):
  4.     label=Label(text=n).pack()
  5. root=Tk()
  6. i=0
  7. while i<4:
  8.     mbutton=Button(text='ok',command=lambda:print_function(i)).pack()
  9.     i+=1
  10. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement