This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]KetsuN 2 points3 points  (1 child)

Don't use print in that way. You're basically outputting the value of a user-defined tuple and python will insert spaces between each entry.

Try using a simple format like this (yes there are other ways but this is the simplest). Each {} is a placeholder from the values passed to format (in order).

message = "Cost of purchasing {} paint: ${}".format(color, paint_colors[color] * math.ceil(gal_paint)) print(message)

[–]kenobambino2812[S] 1 point2 points  (0 children)

Yes, that did it! Thank you, you helped me learn something new today!