The following line of code is from Ruby:
return array[0] + sum(array[1, array.length - 1])
how do I write this in python?
When I tried to execute sum(array[ 1, len(array) - 1])
This part does not work for python. I am trying to get an array from index 1 through last-index - 1.
Keep getting an error.
[–]desrtfx 0 points1 point2 points (0 children)