Adding space before and after special character regex inserting space in alphanumeric string

前端 未结 0 1883
孤独总比滥情好
孤独总比滥情好 2021-02-15 09:54

I have created a function to insert special character before and after any special character

def clean_data(text):
    text = re.sub(\'([!?,\\\'".\\n-:])\',          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题