Is str.replace(..).replace(..) ad nauseam a standard idiom in Python?
Do you have an application that is running too slow and you profiled it to find that a line like this snippet is causing it to be slow? Bottlenecks occur at unexpected places. The current snippet traverses the string 5 times, doing one thing each time. You are suggesting traversing it once, probably doing doing … Read more