from time import sleep import threading def say_hi(): while True: print('hi') sleep(1) def say_hello(): while True: print('Helloooooooooo') sleep(2) threading.Thread(target=say_hi).start() threading.Thread(target=say_hello).start()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter