Print to the same line and not a new line?

Solution 1:

It's called the carriage return, or \r

Use

print i/len(some_list)*100," percent complete         \r",

The comma prevents print from adding a newline. (and the spaces will keep the line clear from prior output)

Also, don't forget to terminate with a print "" to get at least a finalizing newline!

Solution 2:

For me, what worked was a combo of Remi's and siriusd's answers:

from __future__ import print_function
import sys

print(str, end='\r')
sys.stdout.flush()