from tkinter import *
root = Tk()
root.title("Button Counter without OOP")
root.geometry("200x85")
app = Frame(root)
app.grid()
bttn = Button(app)
bttn["text"] = "Total Clicks: 0"
bttn.grid()
bttn_clicks = 0
while True:
if bttn:
bttn_clicks += 1
bttn["text"] = "Total Clicks: " + str(bttn_clicks)
bttn.grid()
I can't seem to get this to work. I want the button to count the clicks without using OOP to make this happen.