Answer the question
In order to leave comments, you need to log in
How to make dynamic text in python terminal?
How can I make text dynamic without using third party modules other than the built-in ones?
for example
[███...]
[████..]
[█████.]
[██████]
Answer the question
In order to leave comments, you need to log in
Print carriage return (\r) without line feed
from time import sleep
import sys
for i in range(11):
sys.stdout.write('\r')
sys.stdout.write("[%-10s] %d%%" % ('='*i, 10*i))
sys.stdout.flush()
sleep(0.25)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question