Generate a function in Python that takes a list of numbers and returns the average value of all the numbers.
Not applicable
def average(numbers):
 sum = 0
 for number in numbers:
 sum += number
 return sum / len(numbers)