def mean(list):
    """
    Calculates the mean of numbers in a list

    :param    list:  The list containing the numbers to calculate the mean from

    :returns: The mean of the numbers in the list
    """
    return float(sum(list)) / max(len(list), 1)