r/learnpython • u/IngenuityMission5367 • Oct 02 '26
Slow print for text-based game
I am trying to make a text-based adventure game in Python, how do I make it so the text is typed out slowly and not instantly? I've tried ways online, but they keep returning None at the end. How do I fix this?
0
Upvotes
View all comments
Show parent comment
1
u/white_nerdy Oct 04 '26
sleepis provided bytimeso you need to sayfrom time import sleepat the top of your program for this to work.Also
flush=Trueis very important, Python by default doesn't send the text you print() to the OS until the end of a line.