Answer:
def mapper( a, b ):
return dict(zip(a,b))
def map2 ( f, x : list, y: list ) ->dictionary:
mapped_lists = f( x, y )
new_list = [ ]
for key, value in mapped_lists.iteritems():
items = [key,value]
new_list.append(items)
return new_list
result = map2( mapper, x, y )
print( result )
Explanation:
The "map2" python function defined above maps two lists of the same length. It receives two iterators or lists and a function and returns a list of mapped items from both lists.