import time
import os
from threading import Thread

def myfunc(i, t):
    print("sleeping %d sec from thread %d" % (t, i))
    os.system("sleep " + str(t))
    #~ os.system("sleep " + str(t) + " &")
    #~ time.sleep(t)
    print("finished sleeping from thread %d" % i)

t1=10
t2=5
for i in range(3):
    t = Thread(target=myfunc, args=(i,t1))
    t.start()
    time.sleep(t2)

6ae38e3e210b432ce5236c32de0e86e3efbdb186
<mask token>


def myfunc(i, t):
    print('sleeping %d sec from thread %d' % (t, i))
    os.system('sleep ' + str(t))
    print('finished sleeping from thread %d' % i)


<mask token>

<mask token>


def myfunc(i, t):
    print('sleeping %d sec from thread %d' % (t, i))
    os.system('sleep ' + str(t))
    print('finished sleeping from thread %d' % i)


<mask token>
for i in range(3):
    t = Thread(target=myfunc, args=(i, t1))
    t.start()
    time.sleep(t2)

<mask token>


def myfunc(i, t):
    print('sleeping %d sec from thread %d' % (t, i))
    os.system('sleep ' + str(t))
    print('finished sleeping from thread %d' % i)


t1 = 10
t2 = 5
for i in range(3):
    t = Thread(target=myfunc, args=(i, t1))
    t.start()
    time.sleep(t2)

import time
import os
from threading import Thread


def myfunc(i, t):
    print('sleeping %d sec from thread %d' % (t, i))
    os.system('sleep ' + str(t))
    print('finished sleeping from thread %d' % i)


t1 = 10
t2 = 5
for i in range(3):
    t = Thread(target=myfunc, args=(i, t1))
    t.start()
    time.sleep(t2)

import time
import os
from threading import Thread

def myfunc(i, t):
    print("sleeping %d sec from thread %d" % (t, i))
    os.system("sleep " + str(t))
    #~ os.system("sleep " + str(t) + " &")
    #~ time.sleep(t)
    print("finished sleeping from thread %d" % i)

t1=10
t2=5
for i in range(3):
    t = Thread(target=myfunc, args=(i,t1))
    t.start()
    time.sleep(t2)
