Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

python convert long floats to usd

def as_currency(amount):
    if amount >= 0:
        return '${:,.2f}'.format(amount)
    else:
        return '-${:,.2f}'.format(-amount)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #convert #long #floats #usd
ADD COMMENT
Topic
Name
4+1 =