Jan-18-2017, 06:53 PM
The code
('${:,.0f}'.format(ETE).rjust(12, ' '), '${:,.0f}'.format(ETFI).rjust(12, ' '), '${:,.0f}'.format(ETC).rjust(12, ' '), '${:,.0f}'.format(ETTA).rjust(12, ' '), '${:,.0f}'.format(ETFE).rjust(12, ' '), '${:,.0f}'.format(ETFFI).rjust(12, ' '), '${:,.0f}'.format(ETFC).rjust(12, ' '))can be compressed to
tuple('${:,.0f}'.format(num).rjust(12, ' ') for num in nums)assuming that all those numbers are in an ordered collection called nums. You can use unpacking to pass the tuple generated with the above comprehension to hdr62.format().