map_()
Map implementation for test compatibility.
Implementation
Args: iterable: The collection to map over func: The mapping function Returns: List of mapped values
Example
map_([1, 2, 3], lambda x: x * x)
Expected output: [1, 4, 9]
Source Code
def map_(iterable, func):
return [func(item) for item in iterable]