Pretty basic stuff. I had this code:
from tkinter import *
import secrets
def stuff():
stuff = ["study math",
"Phone", "social",
"study python","tv",
"exercise"]
print(secrets.choice(stuff))
window = Tk()
button = Button(window,
text="click me",
command=stuff,
font=("Comic Sans", 40),
fg="#00FF00",
bg="black",
activeforeground="#00FF00",
activebackground="black")
button.grid()
But that only prints the listed word on the terminal. I want to print the word on the GUI as a Label. I'm trying stuff like this,
def stuff():
stuff = ["study math",
"Phone", "social",
"study python","tv",
"exercise"]
Label(window, secrets.choice(stuff)).grid(row=1)
Butt.. cant quite figure it out. Can anyone point me in the right direction?