text: 
  #!/usr/bin/env python 
  # -*- coding:utf-8 -*-
  """
  FileName: 203. Remove Linked List Elements.py
  Description: 
  Author: Kimberly Gao
  Date: 2021/07/18 10:44 PM
  Version: 0.1
  """
  
  # Definition for singly-linked list.
  # class ListNode:
  #     def __init__(self, val=0, next=None):
  #         self.val = val
  #         self.next = next
  class Solution:
      def removeElements(self, head: ListNode, val: int) -> ListNode:
          dummy_head = ListNode(next=head) #添加一个虚拟节点
          cur = dummy_head
          while(cur.next!=None):
              if(cur.next.val == val):
                  cur.next = cur.next.next #删除cur.next节点
              else:
                  cur = cur.next
          return dummy_head.next
  