def avg_stdev(lst):
 avg = (sum(lst) / len(lst))
 sdsq = sum((((x - avg) ** 2) for x in lst))
 stdev = ((sdsq / (len(lst) - 1)) ** 0.5)
 return (avg, stdev)

def avg_stdev ( lst ) : avg = ( sum ( lst ) / len ( lst ) ) sdsq = sum ( ( ( ( x - avg ) ** 2 ) for x in lst ) ) stdev = ( ( sdsq / ( len ( lst ) - 1 ) ) ** 0.5 ) return ( avg , stdev )
return average and standard deviation of the given list .