examples/advanced/map_lambda_condition.py
#!/usr/bin/env python
from __future__ import print_function

numbers = [1, 2, 3, 4]

a = map(lambda n: 2*n if n % 2 else n, numbers)
print(a)   # [2, 2, 6, 4]