Returns a random string of the given length.

def randomize(length=6, choices=None):
    """Returns a random string of the given length."""
    if type(choices) == str:
        choices = list(choices)
    choices = choices or ascii_lowercase
    return "".join(choice(choices) for _ in range(length))