I am new to programming and one assignment I have to do is create a random hexdigit colour code generator using for loops and .join. Is my program below even close to how you do it, or is it completely off? And, is there a way to make a random amount of numbers and letters appear within 6?
import random
str = ("A","B","C","D","E","F","G","H")
seq = ("1","2","3","4","5","6", "7","8","9")
print '#',
for i in range(0,3):
letter = random.choice(str)
num = random.choice(seq)
print num.join(letter),
print letter.join(num)