Filter Map Reduce in Python


The filter() function constructs a list from those elements of the list for which a function returns True. It has the following syntax:

filter(function, sequence)


The map() function applies a particular function to every element of a list. It has the following syntax:

map(function, sequence)


The reduce() function returns a single value generated by calling the function on the first two items of the sequence, then on the result and the next item and so on. It has the following syntax:

reduce(function, sequence)