def sanitize_random(value):
    """
    Random string of same length as the given value.
    """
    if not value:
        return value
    return ''.join(random.choice(CHARACTERS) for _ in range(len(value)))
def sanitize_random ( value ) : if not value : return value return '' . join ( random . choice ( CHARACTERS ) for _ in range ( len ( value ) ) )
Random string of same length as the given value.