Waaaayyyy back in chapter 1, you learned about the print statement. It was the first command you ever used in Python. You’ve also seen (in chapter 5) that you can put a comma at the end of a print statement to make Python keep printing the next thing on the same line. (At least, in Python 2. Not in Python 3.) You used that to make prompts for raw_input(), until you learned the shortcut of putting the prompt right in the raw_input() function.
In this chapter, we’re going to look at print formatting—ways to make your program’s output look the way you want it to. We’ll look at things like