Does Python have a trick to get a statement to execute a specified number of times without having to write a loop statement?

I want to click the mouse to specify the coordinate location and specify the number of times. is there any shortcut?
def click (num):

mouseclick(xxx,xxx)

I don't know how to use interval. If it is in an interval, and the total number of times is not more than 1000, you can use recursion:
import time
import sys
def fun (num):

.
num=num
time.sleep(2) 
print(1) -sharpmouseClick() 
num=num-1
if num<=0:
    return -sharpsys.exit() 
else:
    fun(num) -sharpreturn fun(num)
    

fun
fun (999)-sharp continues automatically because recursion has limit, running on it

Sorry, I only know how to do things in a stupid way.

the recursion of Python can be viewed by limit,.
sys.getrecursionlimit ()
create more fun (). If necessary


def click(x,y,count=0):-sharpxycount
    while count:
        mouseclick(x,y)
        count-=1

is this not good?

Menu