Rich Shepard wrote:
> print '%2d   $%11.2f  $%10.2f  $%9.2f  $%9.2f' %(nper, pv, diff, ten, bonus)
>
> and I would like to have the output right justified in the specified field.

>>> "%7.2f..%5d"  % (2.3, 78)
'   2.30..   78'
>>> "%-7.2f..%-5d"  % (2.3, 78)
'2.30   ..78   '

Regards,

-- 
.   Facundo
.
Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to