import threading as H,time as T m=T.time z=H.Thread s=m() r=[] def f():n=m();T.sleep(9);f.t+=m()-n f.t=0 exec"r+=[z(None,f)];r[-1].start();"*8 map(z.join,r) print m()-s,f.t