mylist = [0.30000000000000004, 0.5, 0.2]
getcontext().prec = 2
[('%.2f' % e) for e in mylist]
[Decimal('%.2f' % e) for e in mylist]
data = [float(Decimal('%.2f' % e)) for e in mylist]
data
How to round each item in a list of floats to 2 decmial places