def strip_str(stripstr,text): ''' 给定的字符串去除特定的字符 :param stripstr: 要去除字段 :param text: 原文 :return: ''' new_str=None if stripstr in text: new_str=text.replace(stripstr,"") if stripstr in new_str: return strip_str(stripstr,new_str) return new_str
def strip_str(stripstr,text): ''' 给定的字符串去除特定的字符 :param stripstr: 要去除字段 :param text: 原文 :return: ''' new_str=None if stripstr in text: new_str=text.replace(stripstr,"") if stripstr in new_str: return strip_str(stripstr,new_str) return new_str