How to get python to call a function multiple times. Add the values returned by the function

def a ():
z = random number + random number
while I < 999:

z() 
i+=1

how can I add the values of Z

Mar.06,2021

def a():
    z = 0
    while 1:
        z =  + 
        yield z
      
while i<999:

    res = a() 
    print(res)
    i+=1

sum(z() for _ in range(999))
Menu