def average(values):
    """Calculates the average value from a list of numbers

    Args:
        values (list)

    Returns:
         float: The average value"""
    if len(values) == 0:
        return None
    return sum(values)/len(values)