#NEWLINE# def random_string( min_len = 3 , max_len = 20 , characters = None , **kwargs ) : #NEWLINE# #INDENT# characters = ( characters or _characters ) #NEWLINE# len = ( randint ( min_len , max_len ) if ( max_len > min_len ) else min_len ) #NEWLINE# return '' . join ( ( choice ( characters ) for s in range ( characters ) ) )