I've a python script which loads data from 10k - 12k files and performs some operations. Sometime, this process takes hours. This such cases, I would like to see how much progress has been made by the python script.
Let's say if I'm loading 10,000 files using for loop, I don't want to do something like:
if n % 100 == 0:
print("%d steps completed!" % n)
as this will unnecessarily evaluate the if condition for thousands of times. I know that the total cost of this if statement will still be small compared to hours it takes to run the script, however, I was curious if python has any efficient feature to keep track of the progress.