I tried to use the command mensagem = str(entry.get())
but it does not work, I tried to use entry = Entry(root, textvariable='mensagem')
but it also does not work, see the whole code basically I want to type something in an entry and start in the console ..
from tkinter import *
mensagem = str
def enviar():
mensagem = str(entry.get())
print(mensagem)
root = Tk()
entry = Entry(root, textvariable=mensagem).place(x=10, y=10)
button = Button(root, text='ENVIAR', command=enviar).place(x=30, y=40)
root.mainloop()