So I'm trying to make some sort of basic auto clicker with a rank that updates after a certain amount of clicks, but whenever I update the rank the label that is supposed to display it doesn't change and I don't know how to make the label update
from tkinter import *
count = 0
rank = "click the button to rank up!"
window = Tk()
if count == 1:
rank = "wow first click!"
def click():
global count
count += 1
counter = Label(window, text=count).grid(row = 0, column = 1)
clicker = Button(window, text="The Button", padx = 50, pady = 50, command = click).grid(row = 0, column = 0)
rankDisplay = Label(window, text = rank, padx = 100, pady = 25).grid(row = 1, column = 0)
window.mainloop()
after clicking for the first time, the rank is still displayed as "click the button to rank up" instead of "wow first click", and that's pretty much the issue