I have a list containing text data from a docx file. How can I apply some regex or some lambda function to go through this whole list and 'clean it'; meaning, I'd like to take out \t
and \n
['\tSA [WP5]\t\t\n', "<class 'docx.text.paragraph.Paragraph'>\n", '\t\tCOUNTRY:\n', "<class 'docx.text.paragraph.Paragraph'>\n", '\n']
so that my output looks like:
['SA [WP5]', "<class 'docx.text.paragraph.Paragraph'>", 'COUNTRY:', "<class 'docx.text.paragraph.Paragraph'>", '']