Special char digit
Import re
Text=“Hello,#world123!Thisisasampletextparagraph.Itcontainsspecialcharactersand5
digits.”
#Removespecialcharactersanddigits
Processed_text=re.sub(r’[^a-zA-Z\s]’,‘’,text)
Print(processed_text
Import re
Text=“Hello,#world123!Thisisasampletextparagraph.Itcontainsspecialcharactersand5
digits.”
#Removespecialcharactersanddigits
Processed_text=re.sub(r’[^a-zA-Z\s]’,‘’,text)
Print(processed_text