I am new to python and barely know anything, but learned how to import "locale.currency" (from a suggestion to one of my other threads) to deal with formatting numbers into US currency. The following code:
$1,234,567.89
Does anyone know a way to alter the formula to ROUND (not truncate) to NO decimal places, to get:
$1,234,568
thanks
does what I want
import locale locale.setlocale(locale.LC_ALL, '') 'English_United States.1252' locale.currency(xyz, grouping=True).rjust(14, ' ')If xyz = 1234567.89, then this code prints
$1,234,567.89
Does anyone know a way to alter the formula to ROUND (not truncate) to NO decimal places, to get:
$1,234,568
thanks
does what I want