from tkinter import *
root = Tk()
numL = 0
numD = 0
root.geometry("200x100")
def like():
root_label1.config(text=numL+1)
def dlike():
root_label2.config(text=numD+1)
root_button1 = Button(root, text="Like", command=like)
root_button2 = Button(root, text="Dislike", command=dlike)
root_label1 = Label(root, text=numL)
root_label2 = Label(root, text=numD)
root_button1.grid(row=0,column=0)
root_button2.grid(row=0,column=1)
root_label1.grid(row=1,column=0)
root_label2.grid(row=1,column=1)
root.mainloop()
This code is working without errors but when I press like or dislike button the labels change from 0 to 1 only one time then nothing happens however what I want is when ever I press any button the numbers keep on adding themselves with one.