def _join_chars(chars, length):
 mult = (int((length / len(chars))) + 1)
 mult_chars = (chars * mult)
 return ''.join(random.sample(mult_chars, length))

def _join_chars ( chars , length ) : mult = ( int ( ( length / len ( chars ) ) ) + 1 ) mult_chars = ( chars * mult ) return '' . join ( random . sample ( mult_chars , length ) )
used by the random character functions .