My code:
import random
import string
random = ''.join([random.choice(string.ascii_letters + string.digits ) for n in range(12)])
So far it prints a string which contains uppercase, lowercase letters and numbers, but I don't know how to make it print symbols as well.
How about:
import random
import string
random = ''.join([random.choice(string.ascii_letters + string.digits + string.punctuation ) for n in range(12)])