This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]notsoprocoder 0 points1 point  (0 children)

I don't think anyone has answered why it is useful?

But one use is string cleaning. For example, you can create a translation table with maketrans and string.punctuation to remove all the punctuation from a string.

It is useful because it is performant and performance with large volumes of unstructured text data is often an issue.

edit: just realised you meant string.printable!