擅长:python、mysql、java
<p>使用字符串项和列表理解的简单版本:</p>
<pre><code>item1 = ["test1", "test2"]
item2 = ["test3", "test4"]
item3 = ["test5"]
superItem = [item1, item2, item3]
check = "test1"
result = [item for item in superItem if check in item]
>>> result
[["test1", "test2"]]
</code></pre>