Tags
Asked 4 years ago
11 Aug 2020
Views 383
steave

steave posted

how to put delay in python

how to put sleep or delay in the python

and which is more effective and performance friendly
steave ray

steave ray
answered Nov 30 '-1 00:00

import package first

import time


use sleep method to make program to sleep

time.sleep(1)

script sleep 1 sec.
time.sleep(n)
where n is amount of sec program will sleep and delay execution for that much time
steave

steave
answered Nov 30 '-1 00:00


import asyncio
...

await asyncio.sleep(3)


you can use asyncio also for sleep or delay by code using the async/await
Post Answer