I was messing around with the tqdm module and wanted to run simultaneous progress bars, so i made Thread objects as below
from tqdm import tqdm
import time
from threading import Thread
def func1():
for i in tqdm(range(20)):
time.sleep(0.1)
def func2():
for j in tqdm(range(20)):
time.sleep(0.3)
t1 = Thread(target=func1)
t2 = Thread(target=func2)
t1.start()
t2.start()
t2.join()
t1.join()
print('Completed')
But when thread t2 ends, it exchanges position with the bar display of t1 and t1 runs till it ends.
I don't want the bars to exchange positions
I tried interchanging the positions of lines of starting and joining of threads but it leads to re printing of t1 bar once t2 finishes like this 
To analyse these problems i would recommend trying running these codes for yourself.
Can someone tell me why these both things are happening and how to fix it ?
