def format_float(arg):
 return ('%f' % float(arg)).rstrip('0').rstrip('.')

def format_float ( arg ) : return ( '%f' % float ( arg ) ) . rstrip ( '0' ) . rstrip ( '.' )
formats a float value to be as short as possible .