Im trying to make a random name generator using an imported list and tkinter. I can get a random name its just that it doesn't change the name when the Generate new name button is pressed. Also im new to python, so anything helps lol
Thoughts?
import random
from namelist import namel1ist
import tkinter as tk
name1 = (random.choice(namel1ist) + " " + random.choice(namel1ist))
print(name1)
root = tk.Tk()
tk.Button(root, text='Generate new name',command=name1).pack()
w = tk.Label(root, text=name1)
w.pack()
tk.mainloop()