Answer the question
In order to leave comments, you need to log in
How to make animated text in Python?
I know how to make animated, but how to make it stop animating after the last line ('Test',)?
Code:
loading = [
'T',
'Te',
'Tes',
'Test',
]
while True:
for value in loading:
os.system('cls')
print(value)
time.sleep(0.1)
Answer the question
In order to leave comments, you need to log in
import os
import time
loading = 'Тест'
value = ''
for symbol in loading:
os.system('cls')
value = ''.join([value, symbol])
print(value)
time.sleep(0.1)
import os
import time
loading = 'Тест'
for i,_ in enumerate(loading):
os.system('cls')
print(loading[:i+1])
time.sleep(0.1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question