number_format() in python

php’s number_format() in python.

import locale locale.setlocale(locale.LC_NUMERIC,‘ja_JP.UTF-8’) #locale.setlocale(locale.LC_ALL, “”)    #NG return locale.format("%d",int_p,1) まさかロケール使う羽目になるとは。