Python——棧的實現(面向對象法

class Stack(): def __init__(self): self.stack = [] def push(self,value): self.stack.append(value) return True def pop(self): #先判斷棧是否爲空 if self.st
相關文章
相關標籤/搜索