Your ''.join() expression is filtering, removing anything non-ASCII; you could use a conditional expression instead: return ''.join([i if ord(i) < 128 else ' ' for i in text]) This handles characters one by one and would still use one space per chara
本文基于Stackoverflows上以下几个Question: Fastest way to remove chars from string (http://stackoverflow.com/questions/2182459/fastest-way-to-remove-chars-from-string) More efficient way to remove special characters from string (http://stackoverflow.com/questi