import threading
def write_dbs(i): print(i)if __name__ == '__main__': for i in range(7): t = threading.Thread(target=write_dbs, args=(i,)) t.start()