Program to find sum of elements in a given array | Driver code ; Calling accumulate function , passing first , last element and initial sum , which is 0 in this case .
if __name__ == " _ _ main _ _ " : NEW_LINE INDENT arr = [ 12 , 3 , 4 , 15 ] NEW_LINE n = len ( arr ) NEW_LINE print ( " Sum ▁ of ▁ given ▁ array ▁ is ▁ " , sum ( arr ) ) ; NEW_LINE DEDENT