正则表达式 re.sub 出现sub() missing 1 required positional argument: ‘string‘
sub()missing1requiredpositionalargument:'string'Sub()缺少1个必需的位置参数:'string'我们需要检查一下格式是否正确defsub(pattern,repl,string,count=0,flags=0):"""Returnthestringobtainedbyreplacingtheleftmostnon-overlappingoccurr