from tkinter import *
root = Tk()
entr = Entry(root)
entr.pack()
def foo(e):
s = entr.get().strip()
s = s[-1] if s else ''
entr.delete ('0',END)
entr.insert(INSERT,s)
print (e.char)
entr.bind('<KeyRelease>',foo)
entr2 = Entry(root)
entr2.pack()
def foo2(e):
entr2.delete ('0',END)
print (e.char)
entr2.bind('<KeyPress>',foo2)
root.mainloop()