2
I tried to use the command mensagem = str(entry.get())
but it doesn’t work, I tried to use the entry = Entry(root, textvariable='mensagem')
but also does not work, see the whole code basically want to type something in an entry and printar on 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()