it is not strange, because strip deals with characters, not string, see: https://docs.python.org/2/library/string.html#string.strip
here is an example:
>>> 'HTTP_AAAPH'.strip('HP') 'TTP_AAA'
it means, remove all characters of ('H', 'P') in the leading and trailing characters, so even `PH` is not match `HP`, **they** are removed too
it is not strange, because strip deals with characters, not string, see: https:/ /docs.python. org/2/library/ string. html#string. strip
here is an example:
>>> 'HTTP_AAAPH' .strip( 'HP')
'TTP_AAA'
it means, remove all characters of ('H', 'P') in the leading and trailing characters, so even `PH` is not match `HP`, **they** are removed too