How can I display the letters entered from the keyboard as labels in the gui window? I can only view it on the console right now.
from tkinter import*
from tkinter import ttk
window = Tk()
def letter(event):
a=str(print (repr(event.char)," key pressed."))
label=Label(window,text=a)
label.place(x=15,y=15)
def clicked(event):
frame.focus_set()
print(event.x,event.y ,"coordinate clicked.")
frame =Frame(window, width=500, height=500)
frame.bind("<Key>",letter)
frame.bind("<Button-1>", clicked)
frame.pack()
window.mainloop()