(data)
return sum(data) / n
Return the sample arithmetic mean of data.
Return the sample arithmetic mean of data.
Return the sample arithmetic mean of data .
def mean(data):
    """Return the sample arithmetic mean of data."""
    n = len(data)
    if n < 1:
        raise ValueError('mean requires at least one data point')
    return sum(data) / n
def mean ( data ) : n = len ( data ) if n < 1 : raise ValueError ( 'mean requires at least one data point' ) return sum ( data ) / n