Python output above the last printed line
问题 Is there a way in python to print something in the command line above the last line printed? Or, similarly to what I want to achieve, remain the last line intact, that is, not overwrite it. The goal of this is to let the last line in the command line a status/precentage bar. Output example: File 1 processed (0.1% Completed) Next refresh: File 1 processed File 2 processed (0.2% Completed) Next refresh: File 1 processed File 2 processed File 3 processed (0.3% Completed) 回答1: from time import