import threading def worker(argument): print(argument) return for i in range(5): t = threading.Thread(target=worker, args=[i]) t.start()