# pip install alive_bar with alive_bar(total) as bar: # declare your expected total for item in items: # <<-- your original loop print(item) # process each item bar() # call `bar()` at the end