Answer the question
In order to leave comments, you need to log in
How to change console output?
For example, there is such a program:
import time
print("Hello, World!")
time.sleep(1)
...
Answer the question
In order to leave comments, you need to log in
# -*- coding: utf-8 -*-
import time
import sys
def update_msg(text):
message = f'\r{text}'
sys.stdout.write(message)
sys.stdout.flush()
words = ['world', 'XTerris', 'Maksim']
for word in words:
update_msg(f'Hello, {word}')
time.sleep(1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question