- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
from threading import Thread
from time import sleep
for i in range(4):
print(type(i))
def f(i):
if int(i) == 1:
print('i=',i)
elif i == 2:
print('i=',i)
elif i == 3:
print('i=', i)
t = Thread(target=f, args=(i,))
t.start()
sleep(1)
print(i)
gost 01.06.2017 12:57 # +1
TeaBag 01.06.2017 19:37 # 0
Masha-Rostova 07.06.2017 15:40 # 0