更新时间:2023-11-07 19:40:04
试试这个:
contains = any([True for sublist in list1 if "1" in sublist and "MSG1" in sublist])
Python - 如果在嵌套列表中找到字符串,则返回 true
在Python中,如何获取字符串文本,并返回包含字符串列表的列表?
如何在列表中的字符串中找到单词?(Python)
如何在Python中的列表中找到最短的字符串
如果字符串包含任何单词列表,则R每行返回true或false