Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python thousands separators

import locale
locale.setlocale(locale.LC_ALL, '')  # Use '' for auto, or force e.g. to 'en_US.UTF-8'

'{:n}'.format(value)  # For Python ≥2.7
f'{value:n}'  # For Python ≥3.6
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #thousands #separators
ADD COMMENT
Topic
Name
7+8 =