I need to output 4 different floats to two decimal places.
This is what I have:
print \'%.2f\' % var1,\'kg =\',\'%.2f\' % var2,\'lb =\',\'%.2f\' % va
If you are looking for readability, I believe that this is that code:
print '%(kg).2f kg = %(lb).2f lb = %(gal).2f gal = %(l).2f l' % { 'kg': var1, 'lb': var2, 'gal': var3, 'l': var4, }