You need to format your number. Just add a comma before the type code.
Here is an example:
>>> a=12345678>>> '{0:,d}'.format(a)'12,345,678'