Ad
Code
Diff
  • def sumi(arr):
        return sum(arr)
    • def sumi(arr): # parity: sum([]) == 0
    • #try: return arr.pop(0) + sumi(arr)
    • #except: return 0
    • sum=0
    • for i in range(len(arr)):
    • sum+=arr[i]
    • i+=1
    • return sum
    • def sumi(arr):
    • return sum(arr)