def format_dollars(amount):
    """Input float, Returns formatted dollars($x,xxx.xx)"""
    balance = '{:.2f}'.format(amount)
    balance = balance.split('.')
    bit = balance[0][::-1]
    new_thing = ''
    for i in range(1, len(bit) + 1):
        if (i-1) % 3 == 0 and i != 1:
            new_thing += ','
        new_thing += bit[i - 1]
    balance = '$' + new_thing[::-1] + '.' + balance[1]
    return balance