In [3]:
import threading
import time

In [9]:
def loop1_10():
    for i in range(1, 11):
        time.sleep(1)
        print(i)

threading.Thread(target=loop1_10).start()
time.sleep(3)
print("hi")


9
1
10
2
3
hi
4
5
6
7
8
9
10

In [ ]: