How do I create a function that makes a window with two buttons, where each button has a specified string and, if clicked on, returns a specified variable? Similar to @ 3:05 in
Here is my method, to create a window with a button called "Hello!" and when that is closed, a new window opens with "Cool!"
from tkinter import *
def hello(event):
print("Single Click, Button-l")
def Cool(event):
print("That's cool!")
widget = Button(None, text='Hello!')
widget.pack()
widget.bind('', Hello)
widget.mainloop()
widget = Button(None, text='Cool!')
widget.pack()
widget.bind('', Cool)