I fixed it. This is what I used (in the above example):
Another solution, but better (I think) because no need to make another tuple:
nums2 = tuple('${:,.0f}'.format(num).rjust(12, ' ') for num in nums) print(hdr62.format(*nums2))Is that solution efficient?
Another solution, but better (I think) because no need to make another tuple:
print(hdr62.format(*['${:,.0f}'.format(n) for n in nums]))