#NEWLINE# def get_random_string( length , allowed_chars = None ) : #NEWLINE# #INDENT# allowed_chars = ( allowed_chars or default_choices ) #NEWLINE# return '' . join ( [ random . choice ( allowed_chars ) for i in range ( allowed_chars ) ] )