r/learnpython•
ank_2606

Explain me this.Given an array of integers, we have find the sum of its elements. I am not well know with sys module.

import sys

def simpleArraySum(n, ar):

    # Complete this function
    n = int(input().strip())
    ar = list(map(int, input().strip().split(' ')))
    result = simpleArraySum(n, ar)
return result

Posted Jun 17, 2017, 11:48 AM UTC

114
Loading comments…