I am trying to right align some monetary values to look like this:
John Smith $3,500
Jane Doe $200
Jack Johnson $700
But I am getting this:
John Smith $3500
Jane Doe $ 200
Jack Johnson $ 700.
My code for the output looks like this:
for (name, amount) in cursor:
print("{}".format(name)+ "\t\t\t" + "${:>5,.0f}".format( amount))
I would also like to put a comma separator for numbers in the thousands. I know I've seen the formatting for this before, but I am having trouble finding it again.