📜  python代码示例中的列表理解

📅  最后修改于: 2022-03-11 14:46:08.202000             🧑  作者: Mango

代码示例6
fruits = ["apple", "banana", "cherry", "kiwi", "mango"]
newlist = []

for x in fruits:
  if "a" in x:
    newlist.append(x)

print(newlist)