[PYTHON MATRIX-SIG] printf(%.2f d) -> python

Konrad Hinsen hinsen@ibs.ibs.fr
Mon, 26 May 1997 22:05:16 +0200


> What is the better approch to obtain in python the same result as
> printf(...) in c ?

Formatting with %:

   print "%s: %d" % ("The answer is", 42)

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________