Re: question about string formatting

2008-04-09 Thread Kelie
Thank you Jerry! -- Kelie UliPad is my Python editor. -- http://mail.python.org/mailman/listinfo/python-list

Re: question about string formatting

2008-04-09 Thread Jerry Hill
On Wed, Apr 9, 2008 at 1:04 PM, Kelie <[EMAIL PROTECTED]> wrote: > Is there something in Python built-in function or library that will convert > a number 1205466.654 to $1,205,466.65? To add the "$" sign and set the > decimal place is not a problem, but I don't know how to add the thousands > delim

Re: question about string formatting

2008-04-09 Thread G
>>> import locale >>> locale.setlocale(locale.LC_ALL, '') 'en_US.UTF-8' >>> locale.format('%.2f', 1021212.12, True) '1,021,212.12' >>> On Wed, Apr 9, 2008 at 1:04 PM, Kelie <[EMAIL PROTECTED]> wrote: > Hello, > > Is there something in Python built-in function or library that will > convert a numb