1

I have a list of strings that I would love to change to lower cases and remove punctuations. I am able to change them to lower cases but fail to remove punctuations. Example of the string:

s = 'He is the best doctor. I highly recommend him."

With

slower = s.lower().split(" ")

I obtain

['he', 'is', 'the', 'best', 'doctor.', 'i', 'like', 'him.']

This is good, but I still would like to detach punctuations from the words.

What's the easy way to do this? Thank you!!

yearntolearn
  • 1,064
  • 2
  • 17
  • 36

0 Answers0