Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python filter function using lambda function as one of the parameters

names = ["margarita", "Linda", "Masako", "Maki", "Angela"]
 
M_names = filter(lambda name: name[0] == "M" or name[0] == "m", names) 
 
print(list(M_names))
Source by www.codecademy.com #
 
PREVIOUS NEXT
Tagged: #python #filter #function #lambda #function #parameters
ADD COMMENT
Topic
Name
2+9 =