import time def print_string(string, counter, delay): count = 0 while count < counter: time.sleep(delay) print(string+" "+str(count)) count += 1 print("exiting "+string+" thread") print("main thread done")