I want to strip out <p> and </p> from a string (lets say s).
Right now I am doing this :
s.strip('"<p>""</p>"')
I am not really sure if what I am doing is correct, but this has been effective enough with most of the strings that I have used.
Except, I still get the following string : Here goes..</p>
Is there any other effective way to strip? It does not need to fast or efficient. I need something effective that get’s the work done.
Test Case
Let’s say:
s="<p>Here goes..</p>"
After performing the necessary operations on s, print s should give :
Here goes..
Assuming you’re not trying to sanitise XML/HTML the following will work: