Write a function in Python to compute the mean of a list of numbers.
[1, 3, 4, 8, 5]
def compute_mean(nums):
    sum = 0
    for num in nums:
        sum += num
    return sum/len(nums)

a = [1, 3, 4, 8, 5]
print("Mean =", compute_mean(a)) # Output: Mean = 4.4