from tkinter import * def func(): print('Hello!') window = Frame() window.pack() Label = (window).pack(side=TOP) Button = (window, text = 'Hello, my friend', command = func).pack(side = LEFT) Button = (window, text='Quit', command = win.quit).pack(side = RIGHT) win.mainloop()
Выдаёт следующее:
File "workspace/tkinter/button.py", line 7 Button = (window, command = win.quit, text='Quit').pack(side = RIGHT) ^ SyntaxError: invalid syntax