Is it posible to delay the program for a certain time period.
I know in blitz basic you could type "delay 5" and at that spot in to the program theere would be a 5 second delay when you run it. Can you do that in Python???

Recommended Answers

All 2 Replies

Use the 'sleep' function available in 'time' module.

from time import sleep

sleep(5) #sleeps for 5 seconds
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.