Hi, I want to change a variable in a definition everytime it is called.
when I click on button, it will print 1
when I click on button again, it will print 2
Is this possible?
I have written this code but it doesnt work :)
k=0 def n(): print k if n: k=k+1 from Tkinter import * o=Tk() Button(text="N",command=n).pack(side=LEFT,fill=Y) mainloop()
(apologise for my english) thank you