如何检查列表中的部分字符串?

Bor*_*lis 0 python string list

检查列表中部分字符串的最有效方法是什么?

例如,假设我在以下列表中查找"4110964_se"(True)或"4210911_sw"(False):

files = ['H:\\co_1m_2013\\41108\\m_4110864_se_12_1_20130717.tif',
         'H:\\co_1m_2013\\41108\\m_4110864_sw_12_1_20130717.tif',
         'H:\\co_1m_2013\\41109\\m_4110964_se_12_1_20130722.tif']
Run Code Online (Sandbox Code Playgroud)

如果我使用简单的检查,结果不是我所期望的:

>>> "4110964_se" in files
False
Run Code Online (Sandbox Code Playgroud)

Mal*_*imi 8

any('4110964_se' in f for f in files) # check if the string is in any of the list items
Run Code Online (Sandbox Code Playgroud)