In [1]:
def multiply2(x):
  return x * 2
    
output = map(multiply2, [1, 2, 3, 4])
list(output)
Out[1]:
[2, 4, 6, 8]
In [2]:
output = map(lambda x : x*2, [1, 2, 3, 4])
list(output)
Out[2]:
[2, 4, 6, 8]
In [3]:
list_a = [1, 2, 3]
list_b = [10, 20, 30]
  
output = map(lambda x, y: x + y, list_a, list_b)
list(output)
Out[3]:
[11, 22, 33]