Integer Types
In [1]:
big_integer = 1234325231
In [2]:
type(big_integer)
Out[2]:
In [3]:
'{0:,d}'.format(big_integer)
Out[3]:
Float Types
In [4]:
big_float = 1234325231.00
In [5]:
type(big_float)
Out[5]:
In [7]:
'{0:,f}'.format(big_float)
Out[7]:
In [8]:
'{0:,.2f}'.format(big_float) # .2 means round two decimals
Out[8]:
In [9]:
'{0:,.0f}'.format(big_float)# .0 means round to zero decimals
Out[9]:
This comment has been removed by the author.
ReplyDelete