python中进行延时发送请求

有这么一个需求,代码执行到其中某一个地方,因为某种原因需要先暂停一会然后再往下继续运行,即进行延时,这就需要用到time模块

from time import sleep

from time import sleep
print(5)
sleep(5)
print(10)

程序打印出5,然后延时了5s再输出10。

                                                                                                                                                                                                                     —— 心,若没有栖息的地方,到哪里都是流浪

猜你喜欢

转载自blog.csdn.net/qq_44159028/article/details/112564396
今日推荐