Writen by
Chai Biscuit
10:19 AM
-
0
Comments
Map():Map(function,iterable)
Map function takes a function and an iterable as arguments and applies on each element of vector separately.
The returned value from map object can be passed to functions like list(),set() etc to get values from map object.
Filter():The filter function operates on a list and returns a subset of that list after applying filtering rule.
reduce():The reduce function will transform a given list into a single value by applying a given function continuously to all the elements.
You have to import reduce () from functools ,otherwise below error will be thrown saying 'reduce' is not defined.
No comments
Post a Comment