我想知道如何从一个列表中提取那些与另一个列表中的某些项目不同的项目。在
我想做一些类似的东西:
list_results = ['CONisotig124', '214124', '2151235', '235235', 'PLEisotig1235', 'PLEisotig2354', '12512515', 'CONisotig1325', '21352']
identifier_list=['CON','VEN','PLE']
for item in list_results:
if not item.startswith( "some ID from the identifier_list" ):
print item
那么,我该怎么说:
^{pr2}$
^{} 可以使用字符串的元组来测试:
将此与列表理解结合使用:
演示:
^{2}$很直截了当,你几乎明白了:
相关问题 更多 >
编程相关推荐