import time from threading import Thread def sleepMe(i): print("Thread %i will sleep for 2 seconds." % i) time.sleep(2) print("Thread %i is awake now." % i) for i in range(10): th = Thread(target=sleepMe, args=(i, )) th.start()