In CodeSkulptor (online Python coding page) I wrote a simple code, with a time delay. So simple:
import time
time.sleep(5)
print("random string")
When I press run, I got an error message: Line 2: AttributeError: '<invalid type>' object has no attribute 'sleep'
Any ideas what is wrong? Or how can I fix it?
You're doing javascript. You have to go to py3.codeskulptor.org. Your code works fine there.