I think array is ok but you should iterate the items directly and using f strings is better.
def my_sum(array): result = 0 for value in array: result += value return result array = [1, 2, 3, 4] print(f'sum is {my_sum(array)}')