-- coding:utf-8 -- class ListNode: def init(self, x): self.val = x self.next = Noneclass Solution: # 返回ListNode def ReverseList(self, pHead): # write code here #首先判断头节点为空或者单个节点的情况 if pHead is None: return pHead if pHead.next is None: ...