I cant find anwser anywhere for this question. I have a number and when i click a button i want that number + 1 and so on so like this.
When you click the button it prints 1
When you click again it prints 2
and so on but i dont know how
from tkinter import * root = Tk() zeroo = 0 def add(): zeroo = 0 for zeroo in range(900): zeroo = zeroo + 1 print(zeroo) x = Button(root,text="Do it!", command=add) x.pack() x.mainloop()But this code only prints 900 and what I want is this
When you click the button it prints 1
When you click again it prints 2
and so on but i dont know how