I am trying to use string.strip([char]) function in Python using char argument. I have used it previously for trimming text but with character argument, it is behaving a little odd. I am not able to understand what is the logic behind its working.
string = ' xoxo love xoxo '
# Leading whitepsace are removed
print(string.strip())
#Result: xoxo love xoxo
print(string.strip(' xoxoe'))
#Result: lov
print(string.strip(' dove '))
#Result: lov