I want to strip the substring '_pf'
from a list of strings. It is working for most of them, but not where there is a p
in the part of the string I want to remain. e.g.
In: x = 'tcp_pf'
In: x.strip('_pf')
Out:
'tc'
I would expect the sequence above to give an output of 'tcp'
Why doesn't it? Have i misunderstood the strip
function?