Pausing Your Repl In Python
CodingElf66

Pausing Your Repl In Python

Intro

Hello, guys! Today I'll be teaching you how to pause your repl in Python. It is actually pretty simple, if you just get the hang of it!

Why

Well, you may be thinking: Why should I do this? Well, this is actually quite useful! For long games written in Python (output screen), instead of printing text all at once, we can slowly render each text onto the screen, so the user has time to read them! It is actually quite useful!

How

First, you import the time module in Python.

Then, you can now do time.sleep(t), such that t is in seconds. For example, if we wanted to pause it for 3 seconds, we can do:

Now, we're done!

time.sleep() Parameters

time.sleep() holds only one parameter, and it is 't'. It is basically the number of seconds it will sleep.

Closing

Thanks for reading this tutorial, and good luck and have fun using it!

You are viewing a single comment. View All
SwiftOwl

Oh wow that's how you do it!

Thanks, it helped!

CodingElf66

@SwiftOwl No problem!