Total price

Write total(prices) that returns the sum of all the numbers in prices. Use a loop. An empty list totals 0.

total([40, 25, 2.5])  ->  67.5
total([])             ->  0
def total(prices):
    result = 0
    for price in prices:
        ...
    return result