Hi Jiten<br><br>I have probably a easier way via an import.<br>here you go:<br><br>import locale<br><br>def number_format(number, grouping=0):<br> return locale.format("%.*f", (grouping, number), True)<br><br>regards,<br>
Sri<br><br><div class="gmail_quote">On Sat, Mar 22, 2008 at 2:10 AM, Nanolets nanolets <<a href="mailto:srini@nanolets.in">srini@nanolets.in</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
A stupid way to do this is<br><br>x=123456789<br>x=str(x)<br>n=len(x)<br>s=n%3<br>outs=x[0:s] <br>while ( s < n) :<br> outs = outs + "," + x[s:s+3]<br> s=s+3<br>print outs<div><div></div><div class="Wj3C7c">
<br><br><div><span class="gmail_quote">On 3/19/08, <b class="gmail_sendername">Jiten Shah</b> <<a href="mailto:jiten_shah_78@yahoo.com" target="_blank">jiten_shah_78@yahoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Friends,<br> <br> I am new for python and new for this mailing list also<br> <br> My problem is i want to print<br> 1156179 to -> 1,156,179.00<br> <br> Can somebody help me.<br> <br><br> Jiten<br> <br><br> <br>
<br> <br> ____________________________________________________________________________________<br> Be a better friend, newshound, and<br> know-it-all with Yahoo! Mobile. Try it now. <a href="http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ" target="_blank">http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ</a><br>
_______________________________________________<br> BangPypers mailing list<br> <a href="mailto:BangPypers@python.org" target="_blank">BangPypers@python.org</a><br> <a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
<br></blockquote></div><br>