Iterating a loop with a pause

后端 未结 1 1576
执笔经年
执笔经年 2021-01-13 00:22

I am working to integrate with an API that has a limit on the number of requests per second. Is there a way, when running a for loop in python to delay each cyc

相关标签:
1条回答
  • 2021-01-13 00:59
    import time
    ...
    time.sleep(5)
    

    This will sleep for 5 seconds. See http://docs.python.org/library/time.html#time.sleep

    0 讨论(0)
提交回复
热议问题