import threading
import time
def count(s, c):
for i in range(s, c):
m = '+' + str(i)
print m
time.sleep(0.2)
def count2(s, c):
for j in range(s, c, -1):
n = '-' + str(j)
print n
time.sleep(0.1)
t1 = threading.Thread(target=count ,args=(10,100))
t2 = threading.Thread(target=count2,args=(200,101))
t1.start()
t2.start()
'Coding > Python 삽질기' 카테고리의 다른 글
[Python] Sleep (0) | 2017.07.08 |
---|---|
Python으로 마우스 제어하기 (0) | 2017.06.22 |
Python for Windows Extensions (0) | 2017.06.21 |