i, result=1, 1 while i <= len(lst): result+=lst[i-1] i += 1 return result assert sum[1,1] = 2 3 def sum(lst): i, result=2, 0 while i <len(lst): result+=lst[i] i += 1 return result assert sum[1,1] = 2 1 def sum(lst): i, result=1, 0 while i <= len(lst): result+=lst[i-1] i += 1 return result assert sum[1,1] = 2 def sum(lst): i, result=2, 1 while i <=len(lst): result+=lst[i-1] i += 1 return result assert sum[1,1] = 2 assert sum[0,1] = 1 2 Original