Formatting numbers

Roman Suzi rnd at onego.ru
Wed May 2 00:39:40 EDT 2001


On Wed, 2 May 2001, Roman Suzi wrote:

Ooops!

>Maybe:
>

print "%i.%02i" % divmod(x, 100)

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd at onego.ru _/
_/ Wednesday, May 02, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "Cats have nine lives - but sleep through eight of them." _/





More information about the Python-list mailing list