How to solve this problem
I've been trying to use this function by adjusting the code multiple times but i wasn't successful so if anyone can help me would be great <3
Voters
19ecal (230)
Try this
import asyncio
async def wait(time):
await asyncio.sleep(time)
print("hi")
asyncio.run(wait(5))
print("hi2")
Or
import time
print("hi")
time.sleep(5)
print("hi2")
Asyncio
isn’t required here, use thetime
module provided by python: