def average(values):
 return ((sum(values) / len(values)) if values else None)

def average ( values ) : return ( ( sum ( values ) / len ( values ) ) if values else None )
computes the arithmetic mean of a list of numbers .