Example Code on how you can use threading in python

--

from threading import Thread
import time
def lwa():
while True:
print("aaaaaa")
def lwb():
while True:
print("bbbbbb")
thr1=Thread(target=lwa)
thr1.start()
time.sleep(3)
lwb()

--

--

Drishan T Gupta
Drishan T Gupta

No responses yet