I use end="\r" to print count in on the same line. My python is too fast and CR has not the time to apply. The script goes to next line...
for i in range(10000):
print(i,end="\r")
What it outputs:
3495
6735
9994
9999
It must outputs dynamically the number of lines, on the same line. Then 2 seconds later the outputs must be 10000 in this example...
I have no choice to add a sleep(0.01) but it slows down a lot my script. I have 8Go RAM and 2 CPU. So the script is very fast and the CR might not be taken into account ???
EDIT: answer is to flush. "Printing on the same line on a jupyter notebook" solution is not working because I don't want the sleep function which will the efficiency of the script (I have 400k to 28M items)