说我有这个清单
some_list = [
"red apple",
"red banana",
"house is green",
"blue road",
"blue hat"
]
我想在另一个列表中指定我的关键字。
search_strings = ["red", "green"]
有没有办法在没有太多循环的情况下获得这个最终结果?
# search some_list using keywords from search_strings
red = ["red apple", "red bana"]
green = ["house is green"]