list1 = [1, 2, 6, 8, 7, 10, 5]
print("列表1为:", list1)
list2 = [2, 6, 5, 10]
print("列表2为:",list2)
res = False
a = 0
for i in list2:
if i in list1:
a += 1
if a == len(list2):
res = True
print("列表2是否在列表1中:", res)
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,Given 1->2->3->3->4->4->5,