from time import sleep
def progress(width=30, delay=0.1):
for percent in range(101):
left = width * percent // 100
right = width - left
print('\r[', '#' * left, ' ' * right, ']', f' {percent:.0f}%', sep='', end='', flush=True)
sleep(delay)
if __name__ == "__main__":
progress()