0
I want to understand how I can include the round in the following role:
lstNumerosF = [10.01, 7.03, 2.23]
lstMapa = list(map(lambda x: x ** 2, lstNumerosF))
print(lstMapa)
I wanted to use inside the lambda function the round to round the elements to 3 decimal places.
It’s not just doing
lambda x: round(x ** 2, 3)
?– hkotsubo
That’s right! Thank you very much! It helped me a lot!
– Camilla Marques