I am trying to strip a prefix from a string, e.g. turn
Sometimes the string does not contain the prefix, in which case I would expect nothing to happen. However,
>>> S="Main Page" >>> S.strip("VTK/Examples/") 'Main Pag'
You can see that the 'e' on the end of "Main Page" has been removed.
I even tried to escape the slashes
>>> S.strip("VTK\/Examples\/") 'Main Pag'
but it still strips the 'e'. Can anyone explain this behavior?