21 lines
353 B
Python
21 lines
353 B
Python
|
import time
|
||
|
|
||
|
def countdown(n):
|
||
|
while n > 0:
|
||
|
print("T-minus", n)
|
||
|
n -= 1
|
||
|
time.sleep(5)
|
||
|
|
||
|
def countdown2(n):
|
||
|
while n > 0:
|
||
|
print("T-minus", n)
|
||
|
n -= 1
|
||
|
time.sleep(6)
|
||
|
|
||
|
from threading import Thread
|
||
|
|
||
|
t = Thread(target=countdown, args=(10, ))
|
||
|
t.start()
|
||
|
t2 = Thread(target=countdown2, args=(10, ))
|
||
|
t2.start()
|