identify and remove HTML tags

I am working on a web scrapping project. Many times with the extracted text, some of the HTML tags such as <p>, <br> also comes in the output.

I had made some code to identify them and remove from the output, but i need some optimum code which can identify and remove any HTML tag, instead of coding for individual tags.