I would like to delete some characters into a string (text with several words).
For this purpose I use the code below:
text2 = text.replace(',', '').replace('\n', '').replace('.', '').replace(':', '')
I have to add one replace method for each character to replace.
Is there any form to code in a smarter way? Something like this:
text2 = text.replace(',' '.' '\n' ':', '') # of course this is not working, just an example about how it could be.
Thank you