I'm trying to have it so that when I press a button, the value of this label goes up, it's a score keeper. The error I get when I run my code is TypeError: unsupported operand type(s) for +: 'Label' and 'int' How can I fix this? thanks! Here is my code:
from tkinter import *
root = Tk()
root.title('Basketball Score')
root.geometry("260x600")
point1 = Label(root, text=0)
point2 = Label(root, text=0)
def addone1():
point1 = Label(root, text="0")
point1 = point1 + 1
def addone2():
point2 = Label(root, text="0")
point2 = point2 + 1
titlelabel = Label(root, text="Basketball Score Keeper")
titlelabel.grid(row=0, column=3)
button1 = Button(root, text="Add Point", command=addone1)
button1.grid(row=1, column=0)
button2 = Button(root, text="Add Point", command=addone2)
button2.grid(row=1, column=5)
point1.grid(row=2, column=0)
point2.grid(row=2, column=5)
root.mainloop()