# -*- coding:utf-8 -*- # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # 返回从尾部到头部的列表值序列 def printListFromTailToHead(self, listNode): # write code here s = [] while listNode != None: s.insert(0, listNode.val) listNode = listNode.next return s