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