Formatting numbers

Roman Suzi rnd at onego.ru
Wed May 2 06:34:48 CEST 2001


Maybe:

print "%.2f" % divmod(x, 100)

is the best solution?

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