Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

filter lambda python

# Python Program to find numbers divisible 
# by thirteen from a list using anonymous 
# function
  
# Take a list of numbers. 
my_list = [12, 65, 54, 39, 102, 339, 221, 50, 70, ]
  
# use anonymous function to filter and comparing 
# if divisible or not
result = list(filter(lambda x: (x % 13 == 0 and x>60), my_list)) 
  
# printing the result
print(result)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #filter #lambda #python
ADD COMMENT
Topic
Name
9+2 =