0
How could you separate the output of your code lines by a specified period of time? Python.
For example, you've stated something to tell the user about, and you want to give him/her sometime to read before the execution of the following lines. Thanks in advance.
2 odpowiedzi
+ 4
You must be aware that you cannot do those kind of effect in sololearn code playground context: input/output are handled each at once... whole stream to use as input is send to server before running the script at server side, output is captured during execution, and once time finished, whole output is send back to user side ^^
+ 2
I believe you're looking for something like this:
from time import sleep
print ('Hello, world')
sleep(5)
print('I am learning python!')
you import sleep from time module
the parameter is time in seconds, so in the program above, you print the first statement and after 5 seconds, prints the second.
hope it helps