• strip
  • string

str.strip/lstrip/rstrip aren’t prefix/suffix removal operations. They treat the argument as a set of characters to remove, not as a substring. For prefix or suffix removal, you should use removeprefix/removesuffix, or slicing if you’re on an older Python version.