def format_number(n):
    '''
    >>> format_number(1000)
    '1,000'
    >>> format_number(1234567)
    '1,234,567'
    '''
    ar = list(str(n))
    for i in range(len(ar))[::-3][1:]:
        ar.insert(i + 1, ',')
    return ''.join(ar)
dataset/ETHPy150Open ngsutils/ngsutils/ngsutils/support/ngs_utils.py/format_number/original