from _thread import*
from time import*
from tkinter import*
timer = 60
root = Tk()
root.geometry('400x400')
output = Label(root,text=timer)
def thread1(timer):
for i in range(59):
sleep(1)
output.config(text=timer)
root.update()
timer-=1
def thread2():
for i in range(20):
text = input('What is your name.\n>>>')
print('Nice to meet you '+text+'.')
start_new_thread(thread1,(timer,))
start_new_thread(thread2,())
output.pack()
here is a screenshot of the error
我的问题是我哪里出错了 我已经尝试了一个线程的thread1函数,它可以工作。