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)])
Try:
import random
import string
random = ''.join([random.choice(string.ascii_letters + string.digits ) for n in
range(12)])
print(random)`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With