📜  在 python 列表中查找素数 - Python 代码示例

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

代码示例1
# Program to filter out only the even items from a list
my_list = [1, 5, 4, 6, 8, 11, 3, 12]

new_list = list(filter(lambda x: (x%2 == 0) , my_list))

print(new_list)