makexu93
4/7/2019 - 4:48 PM

Apply Map and Lambda Function in Python

Apply Map and Lambda Function in Python in order to round values in list to 2 digits.

## create list
l = [3.444,5.5656234,78.121345567, 5.0043400]
## apply lambda function
l_round = list(map(lambda x: round(x,2),l))