cost =4.6
print ("The cost of that item is  %8.2f. dollars" % cost)
cost =4345.40
print ("The cost of that item is  %8.2f. dollars" % cost)
cost =34.40
print ("The cost of that item is  %8.2f. dollars" % cost)

print("-------------------------------------------------\n")

cost =4.6
print ("The cost of that item is %-10f. dollars" % cost)
cost =4345.40
print ("The cost of that item is %-10.2f. dollars" % cost)
cost =34.40
print ("The cost of that item is %-10.2f. dollars" % cost)
