题解 | #从单向链表中删除指定值的节点#
从单向链表中删除指定值的节点
http://www.nowcoder.com/practice/f96cd47e812842269058d483a11ced4f
L = list(map(int,input().split()))
N = L[0]
L = L[2:]
new_L = []
new_L.append(L[1])
while len(L) > 1:
a,b = L[0:2]
new_L.insert(new_L.index(b)+1,a)
L = L[2:]
else:
new_L.remove(L[-1])
print(*new_L)