+ 1
Python: How to make each letter typed out 1 by 1.
How would I make a word spelled out. For example if I have a print function where it says... print("Hello world") I can make it spell it out from left to right. It would print "Hello world" still but it would type it out in Python so it wouldn't just be a static print. Is it built in or would I need to import a module for it? Would I need to create a visual for this or can it be done with just a basic text-writer like pycharm?
5 Respuestas
+ 7
import time
for letter in "Hello world":
print(letter)
time.sleep(0.5)
for letter in "Hello world":
print(letter, end="")
time.sleep(0.5)
https://docs.python.org/3/library/time.html#time.sleep
+ 3
How do you mean it? Do you just want to write each letter separately, like a space apart? Or one by one after a time interval? Or what exactly?
+ 2
Thanks works great! Diego
0
One after a time interval. HonFu
0
Deigo, Thanks so much! This is AMAZING.