I can strip numerics but not alpha characters:
>>> text
\'132abcd13232111\'
>>> text.strip(\'123\')
\'abcd\'
Why the followi
The reason is simple and stated in the documentation of strip:
str.strip([chars])
Return a copy of the string with the leading and trailing characters removed.
The chars argument is a string specifying the set of characters to be removed.
'abcd'
is neither leading nor trailing in the string '132abcd13232111'
so it isn't stripped.