Write total(nums) that returns the sum of all numbers in the list (0 for an empty list).
total(nums)
total([1, 2, 3]) → 6
total([]) → 0
Submit runs 5 tests, including hidden edge cases.
Run your code to see the output here.