I am trying to build little window viewer of my sqlite3 database but unfortunetly I cannot find a way. So far I have reached something like below, but instead displaying table it shows whole sets of dictionaries representing each row of sqlite3 table.
from tkinter import *
import sqlite3
main=Tk()
main.geometry('400x400')
main.title('Get data')
def show_data():
with sqlite3.connect('Data.db') as db:
c = db.cursor()
c.execute("SELECT * FROM data")
obj = c.fetchall()
Label(main,text = obj).pack()
but = Button(main, text = 'Show',font = ('',10),command=show_data)
but.pack()
main.mainloop()