Develop a Python function to calculate the mean of a list of numbers.
[1, 5, 8, 9]
def mean(lst):
    total = 0
    for n in lst:
        total += n
    return total / len(lst)

result = mean([1, 5, 8, 9])
print(result)