python locale currency to 0 decimals
Question: I can't figure out how to set my currency to 0 decimals. for now it always
puts .00 behind my currency.

    
    
    locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
    damn = locale.currency(self.damn, grouping=True).replace('$','') + " Dmn"
    

self.damn is always an integer.


Answer: It seems like you are just interested in grouping. You don't need to use the
currency function for this. Use `locale.format()`:

    
    
    import locale
    locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
    damn = '{0} Dmn'.format(locale.format('%d', self.damn, True))
    

And if you don't depend on the `locale` stuff, you can group the number with
`string.format()`, too:

    
    
    # Comma as separator
    damn = '{:,} Dmn'.format(self.damn)
    # Locale aware separator
    damn = '{:n} Dmn'.format(self.damn)
    

