import random

def gen_hex_colour_code():
    return ''.join([random.choice('0123456789ABCDEF') for x in range(6)])
if __name__ == '__main__':
    pass
How would I make a random hexdigit code generator using .join and for loops?