inserting commas to separate large number?
HI
Is there a way i can add commas to a nu开发者_如何学Pythonmber like so:
num= 1234567
then becomes
num = 1,234,567
I would like to make this call in my helper i.e module
thanks
Use number_with_delimiter.
From your helpers:
number_with_delimiter(12345678) # => 12,345,678
UPDATE: The code for the method.
精彩评论