Jenny Allar wrote: > I'm only a few days in to learning Python, so please bear with me.
Welcome! > I need to line up the decimals on the printed information but I cannot get > the text to look uniform at all. > print("The cost of the carpet is $", format(subtotal,'9,.2f')) > print("The flat fee is $", format(fee,'9,.2f')) Just add some spaces manually: print("The cost of the carpet is $", format(subtotal,'9,.2f')) print("The flat fee is $", format(fee,'9,.2f')) This is usually written as print("The cost of the carpet is $ {:9,.2f}".format(subtotal)) print("The flat fee is $ {:9,.2f}".format(fee)) If this is not what you want you need to give more details; for instance: the above won't look "uniform" when it is displayed in a proportional font. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor