user
Create a program to find the sum of the numbers in a given list.

Now complete the following instance -
Input: [1, 2, 3, 4, 5]
Output:
assistant
def sum_list(nums):
   result = 0
   for n in nums:
      result += n
   return result

print(sum_list([1, 2, 3, 4, 5]))

# Output
15