def rand_string(min, max):
 int_gen = random.randint
 string_length = int_gen(min, max)
 return ''.join([chr(int_gen(ord(' '), ord('~'))) for __ in range(string_length)])

def rand_string ( min , max ) : int_gen = random . randint string_length = int_gen ( min , max ) return '' . join ( [ chr ( int_gen ( ord ( ' ' ) , ord ( '~' ) ) ) for __ in range ( string_length ) ] )
returns a randomly-generated string .