Stuff
public python v1 · immutableclass MyString(str): def __sub__(self, y): if self.endswith(y): return self[:-len(y)]x = MyString("mailbox")print x - "box"class MyString(str): def __sub__(self, y): if self.endswith(y): return self[:-len(y)]x = MyString("mailbox")print x - "box"