I am new to python and I have a question. In this script I rename the elements of a string. For a small input z < 1mb text file time is small. If I try input more than 2Mb it takes over 1 hour.
Is the time problem caused by the dictionary? Should I try to approach it via list or set? I have seen this article Python: List vs Dict for look up table about dicts being better than lists. I am a bit confused.