Python 代码
class Solution(object):
def deleteNode(self, node):
"""
:type node: ListNode
:rtype: void
"""
if node.next:
node.val = node.next.val
node.next = node.next.next
return node
else:
return null