I have a Python program I am writing and I want it to be able to change text after it is printed. For example, let\'s say I want to print \"hello\" and erase one letter eve
For multi-line output, you can also clear the screen each time and reprint the entire thing:
from time import sleep
import os
def cls():
os.system('cls' if os.name=='nt' else 'clear')
message = 'hello'
for i in range(len(message), 0, -1):
cls()
print message[:i]
sleep(1)