from tkinter import *
def click():
UsersName=name.get
nameList.insert(END,name)
window=Tk()
window.title("Name List")
window.geometry("400x400")
window.configure(bg="light grey")
label1=Label(text="Enter a name:")
label1.place(x=50,y=70)
button1=Button(text="Add to list",width=10, command=click)
button1.place(x=290,y=70)
nameList=Listbox()
nameList.place(x=150,y=100,width=120,height=150)
name=Entry(text="")
name.place(x=150,y=70,width=120,height=20)
window.mainloop()
