📜  python列表理解-任何代码示例

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

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

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

print(newlist)