As per the title, I am looking for a Python function similar to Lua’s string.sub, whether it be 3rd party or part of the Python Standard library. I’ve been searching all over the internet ( including stackoverflow ) for nearly an hour and haven’t been able to find anything whatsoever.
Share
Python doesn’t require such a function. It’s slicing syntax supports String.sub functionality (and more) directly: