def _random_string(length):
 return ''.join((random.choice((string.letters + string.digits)) for _ in range(length)))

def _random_string ( length ) : return '' . join ( ( random . choice ( ( string . letters + string . digits ) ) for _ in range ( length ) ) )
generates random string .