Question: In Python, how to round a list of float to 2 decimals? For example, I have list = [6557.590000000001, 4716.89, 4.14, 114.31, 12.490000000000009, 6700.19, 0,

In Python, how to round a list of float to 2 decimals? For example, I have list = [6557.590000000001, 4716.89, 4.14, 114.31, 12.490000000000009, 6700.19, 0, 326.5, 651.4399999999999, 0.0], how to round all items in the list to display 2 decimals?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!