from tkinter import *
tk = Tk()
canvas = Canvas(tk, width=640, height=480)
canvas.pack()
entry = Entry(canvas,width=20,).place(x=150,y=300,)
def delete(event):
entry.delete(0, END)
canvas.bind_all('<KeyPress-Return>', delete)
while 1:
tk.update_idletasks()
tk.update()