Time delay in Python

0 votes
Can anyone tell me how to put a time delay in Python script?
Oct 4, 2018 in Python by ana1504.k
• 7,870 points
91 views

1 answer to this question.

0 votes

The following code will delay it for 3 seconds:

import time
time.sleep(3)

Another example to run something once a minute approximately:

import time
while True:
    print("This prints once a minute.")
    time.sleep(60)
answered Oct 4, 2018 by SDeb
• 13,180 points

Related Questions In Python

0 votes
1 answer

How to put time delay in Python?

You can use sleep() method to sleep ...READ MORE

answered May 28 in Python by Taj
• 1,040 points
29 views
0 votes
1 answer

Create time lag in Python

import time time.sleep(10) READ MORE

answered May 2, 2018 in Python by Nietzsche's daemon
• 4,260 points
228 views
0 votes
3 answers

How to get the current time in Python

FOLLOWING WAY TO FIND CURRENT TIME IN ...READ MORE

answered Apr 8 in Python by rajesh
• 1,210 points
78 views
0 votes
1 answer

How to get the current time in Python

>>> import datetime >>> datetime.datetime.now() datetime(2018, 25, ...READ MORE

answered Jul 25, 2018 in Python by Frankie
• 9,810 points
52 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 328 views
0 votes
1 answer

Get the Current time in Python

To get the current date and time ...READ MORE

answered Oct 3, 2018 in Python by SDeb
• 13,180 points
56 views
0 votes
1 answer

How to measure time elapsed in Python?

If you just want to measure the ...READ MORE

answered Dec 4, 2018 in Python by SDeb
• 13,180 points
1,066 views