import threading thread1 = threading.Thread(target=fun, args=[1, 2, 3,]) thread1.start() thread1.join()