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
示例#3
0
 def push(self, ele):
     temp = ListNode()
     temp.setVal(ele)
     temp.setNext(self.top)
     self.top = temp