Neil Cerutti wrote: > punctuation_removal_table = str.maketrans({c: None for c in > string.punctuation}) Alternative spellings: >>> from string import punctuation >>> (str.maketrans({c: None for c in punctuation}) ... == str.maketrans(dict.fromkeys(punctuation)) ... == str.maketrans("", "", punctuation)) True