When I run this code, it adds a blank line to the bottom of my textbox. I want my textbox to just show NEW TEXT after return is pressed, and I cannot figure out how to accomplish it. I searched on this site and could not find an answer, so apologies in advance if this is a duplicate question.
import tkinter as tk
def update(event):
entry.delete('1.0', tk.END)
entry.insert('1.0', 'NEW TEXT')
if entry.get('end-1c', 'end') == '\n':
entry.delete('end-1c', 'end')
root = tk.Tk()
root.config(bg='snow3')
root.geometry('200x200')
entry = tk.Text(root, height=1.3, width=12)
entry.bind('<Return>', update)
entry.configure(wrap='none')
entry.pack()
root.mainloop()