Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find prime in python list

# 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)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #find #prime #python #list
ADD COMMENT
Topic
Name
2+2 =