import random


def random_hex(digits = 12):
    """Generate a string of random hexadecimal digit and return as a string.
    
    Arguments:
    digits: the number of hexadecimal digits to create
    """
    str_hex = ''.join([''.join(random.choice("0123456789ABCDEF")) for _ in range(digits)])
    return str_hex