Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

How to print 1 letter at a time.

OldWizard209
OldWizard209

Hi, I want to print one letter at a time with an interval of 0.3 seconds on the same line. How am I supposed to implement it in my program. I appreciate your kind help.

2 years ago
You are viewing a single comment. View All
3
RYANTADIPARTHI
RYANTADIPARTHI

You could do it this way:

import time import sys import os for x in ("YOUR TEXT"): sys.stdout.write(x) sys.stdout.flush() time.sleep(0.3)

So this will work, you can set the time equal to your accordance. write your sentence where I put your text.

2 years ago
2
OldWizard209
OldWizard209

Thanks

@RYANTADIPARTHI
. It worked As always Thanks a lot.

BTW you answered first this time soo good luck with your 5 new cycles :)

2 years ago
2
OldWizard209
OldWizard209

Nope. Thanks to you . You earned it

@RYANTADIPARTHI

2 years ago
1
Bookie0
Bookie0

make it into a function

@RYANTADIPARTHI

2 years ago
1
Bookie0
Bookie0

I wrote a comment with how to do it

@abdullahrajput9

2 years ago