When the function gets called, the *args are a tuple so I have to append each argument to a list first. Then I sum them by mapping their values to float and using the sum() function.
There is nothing wrong whith this block of code, but I get a warning saying "Unused variable i".
def function(*args): x =  y = 0 for i in range(len(args)): x.append(args[y]) y += 1 x = list(map(float, x)) return sum(x)
Is there a way to do this in some other way that doesn't envolve using a "for i" loop and is more efficient?