[Tutor] Rounding Floating Points

Glynn Black blackgr@alltel.net
Mon, 31 Jan 2000 21:12:47 -0500 (EST)


I'm looking to round off a floating point number and then convert it to a
string. I've accomplished this with the following in Perl:

$output_label2_var = sprintf("%.2f", $output_label2_var);

but have yet to find any reference to sprintf() in any my Python
books/references or any other means of getting the same results for that
matter. How would I go about accomplishing this in Python?

Glynn Black		blackgr@alltel.net