import time,sysfor i in range(0,100): s=" {mask:s}{name:s}".format(mask="="*i,name=str(i)+"%") time.sleep(0.1) sys.stdout.write(s)