MAP ,FILTER AND REDUCE '''
Map ,Filter and reduce are three functions that can be used for convenience
all the functions have a similar syntax
syntax map/filter/reduce(function,iterable)
lets take examples of all the three
'''
#-----------------------------------------MAP----------------------------------
'''
Map function operates the function on the iterable (in this case list1) and return an object
since Map function returns an object…