And another choice.
import string print("".join((string.ascii_letters, string.digits, string.punctuation)))
Output:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~