Python string operations time complexity. But, when in doubt, timeit!.