Christian Heimes added the comment:
It's not a bug. strip() does not work like you think. Please read the
documentation
https://docs.python.org/3/library/stdtypes.html?highlight=strip#str.strip
--
nosy: +christian.heimes
resolution: -> not a bug
stage: -> resolved
status: open ->
New submission from Akilesh K :
When the argument to lstrip / strip has a number and it matches the string it
begins to act different.
>>> text = "apiv1appliance"
>>> text.strip("apiv1")
'liance'
>>> text.strip("apiv2")
'1appliance'
>>> text.strip("a")
'piv1appliance'
>>> text.strip("ap")