def mean(values):
    """returns mean of a list of values

    :param values: list of values to be evaluated
    :returns: float: mean of values
    """
    if not values:
        return 0
    return float(sum(values)) / len(values)