Ad
Code
Diff
  • lambda x: int(x)
    • def convert(somethin):
    • int(somethin)
    • lambda x: int(x)
Code
Diff
  • def sum(arr):
        var = 0
        for i in range(len(arr)):
           var += arr[i]
        return var
        
        
    
       
    
        
            
    
    • from operator import add
    • from functools import reduce
    • def sum(arr):
    • return reduce(add, arr, 0)
    • var = 0
    • for i in range(len(arr)):
    • var += arr[i]
    • return var