I have a number, for example 1.128347132904321674821 that I would like to show as only two decimal places when output to screen (or written to a file). How does one do that?
if you just want to round a number or a list, simply use
round(data, 2)
Then, data will be round to 2 decimal place.