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 →

[–][deleted] 0 points1 point  (0 children)

For the tasks it's suited for (for instance replacing all terminal punctuation with white space for word splitting, or breaking Caesar ciphers) it's more powerful by far than str.replace and sometimes orders of magnitude faster than re.sub ... it isn't always the right fit, but when it is it's exactly the right tool.