from tkinter import *
def change_text():
my_label.config(text=faction.get())
window = Tk ()
window.title(‘lotr faction option’)
my_label = Label(window,width=45, height=25, text=’ ')
def change_text():
my_label.config(text=‘thanks for your vote’)
my_button.grid(row=9,column=0)
my_label.grid(row=0,column=0)
my_button = Button(window, text=‘submit’ , width=10, command=change_text)
my_button.grid(row=1,column=0)
faction = StringVar()
my_label = Label(window,width=25, height=5, text=’ ')
my_label.grid(row=0,column=0)
my_button = Button(window, text=‘Gondor’ , width=10, command=change_text)
my_button.grid(row=1,column=0)
my_button = Button(window, text=‘Lothlorien’ , width=10, command=change_text)
my_button.grid(row=2,column=0)
my_button = Button(window, text=‘Rohan’ , width=10, command=change_text)
my_button.grid(row=3,column=0)
my_button = Button(window, text=‘Mordor’ , width=10, command=change_text)
my_button.grid(row=4,column=0)
my_button = Button(window, text=‘Erebor’ , width=10, command=change_text)
my_button.grid(row=5,column=0)
my_button = Button(window, text=‘Isengard’ , width=10, command=change_text)
my_button.grid(row=6,column=0)
my_button = Button(window, text=‘Angmar’ , width=10, command=change_text)
my_button.grid(row=7,column=0)
my_button = Button(window, text=‘Rhûn’ , width=10, command=change_text)
my_button.grid(row=8,column=0)
my_button = Button(window, text=‘Lindon’ , width=10, command=change_text)
window.mainloop()