input1 = input('输入全部单词:') input2 = input('输入排序单词:') list1 = input1.split(" ") list2 = input2.split(" ") list = [str for str in list1 if str not in list2] print(list)