how can I delete the extra brackets from result
?
{{ }}
Code for connect with database:
import pymysql
try:
db = pymysql.connect(host='localhost', user='root', password='', db='testdb', )
cursor = db.cursor()
cursor.execute("SELECT text FROM wiadomosci WHERE msgid=1")
result = cursor.fetchall()
except:
result = '[Something went wrong][1] :('
Code for tkinter:
textExample = Text(window, height=1)
textExample.insert(1.0, "Message from owner: ")
textExample.config(state=DISABLED)
textExample.pack()
textExample2 = Text(window, height=3)
textExample2.insert(1.0, result)
textExample2.config(state=DISABLED)
textExample2.pack()