python的list的pop()问题
class Stack(object): def __init__(self): self.stack=[] def push(self,object): self.stack.append(object) def pop(self): self.stack.pop() def length(self): return len(self.stack)s=Stack()s.push("Dave")s.push(42)s.push([3,4,5])print s.length()print s.pop()y=s.pop()print ydel s
class Stack(object): def __init__(self): self.stack=[] def push(self,object): return self.stack.append(object) def pop(self): return self.stack.pop() def length(self): return len(self.stack