list2

来源:互联网 发布:csol一键瞬狙数据 编辑:程序博客网 时间:2024/06/08 08:52
list=["grape","orange"]
list2=["apple",list,"orange"]
print list
print list2


list3=[i for i in list if i not in list2]

print list3


======================= RESTART: C:/Python27/list2.py =======================
['grape', 'orange']
['apple', ['grape', 'orange'], 'orange']
['grape']