ReePrime
Multi_threading in python.

Hosted by Dailymotion. For legal issues report at the Copyright Center, report us on DMC, or use the Instant Removal tool.

Multi_threading in python.

A
argho mitra

5 Views • May 09, 2023

Description

code:
import threading
import time
def function1():
for i in range(1,11):
print(i)
time.sleep(0.5)


def function2():
for i in range(ord('a'), ord('j')+1):
print(chr(i))
time.sleep(2)

thread_fun1 = threading.Thread(target = function1)
thread_fun2 = threading.Thread(target = function2)
thread_fun1.start()
thread_fun2.start()

# function1()
# function2()