how do i run two python loops concurrently 3f

Solutions on MaxInterview for how do i run two python loops concurrently 3f by the best coders in the world

showing results for - "how do i run two python loops concurrently 3f"
Lukas
14 Oct 2020
1from multiprocessing import Process
2
3def loop_a():
4    while 1:
5        print("a")
6
7def loop_b():
8    while 1:
9        print("b")
10
11if __name__ == '__main__':
12    Process(target=loop_a).start()
13    Process(target=loop_b).start()
14
similar questions