to execute in an independent thread
import time
def countdown(n):
while n > 0:
print('T-minus...', 10)
('T-minus', 9)
('T-minus', 8)
('T-minus', 7)
('T-minus', 6)
('T-minus', 5)
('T-minus', 4)
('T-minus...', 3)
('T-minus', 2)
('T-minus', 1)
创建一个线程实例后,需要调用start()让其运行。...', 10)
('T-minus', 9)
('Counting', 1)
('Counting', 2)
('T-minus', 8)
('Counting', 3)
('T-minus', 7)
(...'Counting', 4('T-minus', 6)
)
('T-minus', 5)
('T-minus', 4)
('T-minus', 3)
('T-minus', 2)
('T-minus',