from _thread import start_new_thread from time import sleep def clicker(): while True: sleep(1) print("click") def beeper(): while True: sleep(1) print("beep") start_new_thread(beeper, ()) start_new_thread(clicker, ()) sleep(10)