class Solution: def ReverseList(self , head: ListNode) -> ListNode: #处理空链表 if not head: ...