In Python, how can I do multiple formats at once:
So I want to make a number have no decimal places and have a thousands separator:
num = 80000.00
I want it to be 80,000
I know I can do these two things serepatly, but how would I combine them:
"{:,}".format(num) # this will give me the thousands separator
"{0:.0f}".format(num) # this will give me only two decimal places
So is it possible to combine these together??
"{:,.2f}"if you want the two decimal places