docs: def pop(self):
          """
          return the last stack element and delete it from the list
          """
          if not self.empty():
              val = self.stack[-1]
              del self.stack[-1]
              return val