sum of n numbers in python using for loop