Thousands separators for numbers in Python < 2.6
Python 2.7 and later have format(), but in Python 2.6 and lower, if you want to format big numbers with thousands separators, you are on your own. This code seem to work nicely and is tolerant.
Python 2.7 and later have format(), but in Python 2.6 and lower, if you want to format big numbers with thousands separators, you are on your own. This code seem to work nicely and is tolerant.