def w():
for i in range(1, 5):
print("q")
print(i,"w")
def w1():
for i in range(1, 5):
print("q1")
print(i,"w1")
def main():
Thread(target=w).start()
Thread(target=w1).start()
main()
This is console module
q
1 w
q1
q
1 w1
2 w
q1
q
2 w1
3 w
q1
q
3 w1
4 w
q1
4 w1