I am new here and new to coding with python. I recently started an online coarse and wanted to see if there was an easier way that I could have created a 12 digit random hex list. I wanted each individual bit to be a random number or letter either lowercase or uppercase. Based on my rookie research this was the best I could find and created my own code.. so could I have done this a lot simpler and efficient?
#!/user/bin/python
import string
import random
r1 = random.choice(string.hexdigits)
r2 = random.choice(string.hexdigits)
r3 = random.choice(string.hexdigits)
r4 = random.choice(string.hexdigits)
r5 = random.choice(string.hexdigits)
r6 = random.choice(string.hexdigits)
r7 = random.choice(string.hexdigits)
r8 = random.choice(string.hexdigits)
r9 = random.choice(string.hexdigits)
r10 = random.choice(string.hexdigits)
r11 = random.choice(string.hexdigits)
r12 = random.choice(string.hexdigits)
randnumb = r1+r2+":"+r3+r4+":"+r5+r6+":"+r7+r8+":"+r9+r10+":"+r11+r12
print(randnumb)