2013-06-02

Python: format number in human readable way

Example:

# -*- coding: utf-8 -*-
# python 3

print("{:,}".format(78515573)) # 78,515,573

This is available in both python 2.7 and 3. Detail: Python 3: Formatting String