【leetcode❤python】237. Delete Node in a Linked List
#-*- coding: UTF-8 -*-
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def deleteNode(self, node):
if node.next==None or node ==None:return
node.val=node.next.val
node.next=node.next.next