View Single Post
Old Jun 23rd, 2005, 9:53 AM   #3
Moldz
Programmer
 
Moldz's Avatar
 
Join Date: Feb 2005
Posts: 54
Rep Power: 4 Moldz is on a distinguished road
Could you explain why round() isn't working? Works fine for me:
E = [1.1111111111, 2.222222222, 3.33333333, 100.5555555, -341.99]
E = [round(i, 1) for i in E]
for num in E:
    print num
It gives me:
1.1
2.2
3.3
100.6
-342.0
Moldz is offline   Reply With Quote