code: def pop(self):
          
  
          if self.stack:
              val = self.stack[0]
              self.stack = self.stack[1:]
              return val
          else:
              raise StackError('Stack empty')
docs: Pops a value off the top of the stack.
  
          @return: Value popped off the stack.
          @rtype: *
  
          @raise StackError: Raised when there is a stack underflow.