I have customized two functions now
def test():
while True:
...
...
def test1():
while True:
...
...
These two functions are two functions in an infinite loop. Now I want these two functions to be executed simultaneously in the same PY file. I don’t know if the experts have any good solutions. Newbie asking for advice.
溫故而知新,可以為師矣。 博客:www.ouyangke.com
Multiple threading
import threading
threading.Thread(target= test).start()
threading.Thread(target=test1).start()