I am using Python's strip method to remove a substring from string. Below is the example.
test = "router_sdkf12e"
print(test.strip("router_"))
Output : sdkf12
Issue : 'e' from the end of string is getting remove. However if there is some other letter other than 'e', then that letter is not removed. Why such weird behavior?
test = "router_sdkf12a"
print(test.strip("router_"))
Output : sdkf12a
Regards, Rahul Kumbhar