import string
import random


def random_string(length=6):
    """Generate a random string

    Parameters
    ----------
    length :
        length of the random string (Default value = 6)

    Returns
    -------
    type
        random string

    """
    char_set = string.ascii_uppercase + string.digits
    random_str = ''.join(random.sample(char_set, int(length)))
    return random_str