I am still learning Tkinter and I am trying to make a simple programe that on a button click will gen three random nums but the def will not change the var, it will print it to the console but will not change the vars
from tkinter import *
import random
firstNum = 0
secondNum = 0
thirdNum = 0
def PickNewNums():
firstNum = random.randint(1, 100)
secondNum = random.randint(1, 100)
thirdNum = random.randint(1, 100)
print(firstNum)
return firstNum, secondNum, thirdNum
root = Tk()
mainTitle = Label (root, text = "Amazing Title")
newNumbers = Button(root, text = "Get New Numbers", command=PickNewNums)
firstNumber = Label(root, text = firstNum)
secondNumber = Label(root, text = secondNum)
thirdNumber = Label(root, text = thirdNum)
mainTitle.pack()
firstNumber.pack()
secondNumber.pack()
thirdNumber.pack()
newNumbers.pack(side = BOTTOM)
root.geometry("600x300")
root.mainloop()
Thanks for any help here guys!