def createNode(self, val): node = Node() node.setVal(val) node.setNext(None) return node
def createNode(self, val): node = Node() node.setVal(val) return node
def push(self, ele): temp = ListNode() temp.setVal(ele) temp.setNext(self.top) self.top = temp