sum_even_odd(nums) that returns a tuple (even_sum, odd_sum) — the sum of all even numbers and the sum of all odd numbers in the list nums — computed in a single pass with one loop and two accumulators.sum_even_odd([1, 2, 3, 4, 5, 6])
(12, 9)
Evens 2+4+6=12; odds 1+3+5=9.
sum_even_odd([])
(0, 0)
Empty list sums to zero on both.
Initialize two accumulators to 0 before the loop.
Branch on `n % 2 == 0` inside the loop to decide which accumulator to update.