Ad
Code
Diff
  • def sum(arr):
        var = 0
        for i in arr:
           var += i
        return var
    
    • def sum(arr):
    • var = 0
    • for i in range(len(arr)):
    • var += arr[i]
    • for i in arr:
    • var += i
    • return var