Мой код:
Код: Выделить всё
import tkinter
from tkinter import Button, ttk
def show_results(result: dict):
def show(text):
w = tkinter.Tk()
w.geometry('500x450')
result_lb = ttk.Label(master=w, text=text)
result_lb.place(x=5, y=5)
w.mainloop()
win = tkinter.Tk()
win.geometry('500x800')
x = 5
y = 5
for res in result:
r = result[res]
print(r)
cmd = lambda: show(r)
Button(master=win, text=f" {r} ", command=cmd).place(x=x, y=y)
y += 25
win.mainloop()
show_results({'0': ['jack', '18', 'newyork'], '1': ['alex', '20', 'texas']})
Подробнее здесь: https://stackoverflow.com/questions/785 ... -correctly