new_contents: # -*- coding:utf-8 -*-
  # Definition for singly-linked list.
  # class ListNode:
  #     def __init__(self, x):
  #         self.val = x
  #         self.next = None
  
  class Solution:
      # @return a ListNode
      def removeNthFromEnd(self, head, n):
          slow = head
          fast = head
          while n > 0:
              fast = fast.next
              n -= 1
          if fast is None:
              return head.next
          while fast.next is not None:
              fast = fast.next
              slow = slow.next
          slow.next = slow.next.next
          return head
  
subject: add leetcode Remove Nth Node From End of List