def progress_bar(step, max_step): progress = int(100 * float(step) / float(max_step)) print( '\r[{0}] {1}%'.format('#'*(progress/10), progress),)