Making Text Come Out Slowly

Question:
Is there a way to make the text not just pop up but to make it come out slowly like someone is typing it out?

Not Like This:

Screenshot 2023-09-25 10.56.20 AM

But Something Like This:

1 Like

Oh, you want a typewriter effect?

Yes, something like that.

1 Like

Oh, yeah it’s easy just use this:

import sys
import time

def typewriter_print(text, delay=0.05):
    for char in text:
        sys.stdout.write(char)
        sys.stdout.flush()
        time.sleep(delay)

if __name__ == "__main__":
    text_to_print = "This is typewriter-style printing in Python."
    typewriter_print(text_to_print)
3 Likes

Thank you very much!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.