def newwindow(): ----------- def exit(): exit() root=Tk() signup=Button(root,text="Sign Up",command=[ newwindow(),exitt() ], width=12,bg='green',fg='white',font=("arial",12,'bold'))
использовать больше функций:
def newwindow(): ----------- def exit(): exit() def my_command(): newwindow() exit() root=Tk() signup=Button(root,text="Sign Up",command=mycommand, width=12,bg='green',fg='white',font=("arial",12,'bold'))```