How to use conditions for map and lambda in Python. if - else condition should be used for mapping the elements of list.