def powerlaw_sequence(n, exponent=2.0):
 return [random.paretovariate((exponent - 1)) for i in range(n)]

def powerlaw_sequence ( n , exponent = 2.0 ) : return [ random . paretovariate ( ( exponent - 1 ) ) for i in range ( n ) ]
return sample sequence of length n from a power law distribution .