Python:在1秒内运行函数N次

2024-06-11 08:06:41 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个python function,我想在1 second中运行该函数n times

我怎样才能做到这一点,有人能帮我吗

我的职能:

def run():
   print("hello")

我想在1秒内运行这个函数1000

我刚才给了你一个小例子。但我的实际功能将发送 3 api-请求


Tags: 函数run功能apihellodeffunction例子