I have to use a very long while loop in Python, so it takes quite a while for the program to finish executing. I would like to know, while the code is running, how long the program has left to complete.
I had thought of printing the number of the iteration in progress:
while N > 0:
...
N = N-1
print(N, "iterations completed")
However, I think this may be slowing down too much the execution. Is there maybe a better option?