为什么要使用正则表达式?mystring = mystring.replace(",", "") 够了。 当然,如果你坚持:mystring = re.sub(",", "", mystring) 但那可能会慢一个数量级。