stories like this happened a few times like this before in this forum, where someone compared the performance of Python and Nim with string operation.
When you're doing string operations in Python the vast majority of work is done by well optimised routines written in C, so the performance will be similar. Nim starts to shine once you want to write even more optimised (maybe with simd) or custom routines, because you then don't need to switch programming language or write wrappers.