Formatting output refers to the way text or data appears when displayed. It's about making your output clean, readable, and organized.
Formatting can include:
- Inserting newline characters () to break up lines
- Adding tabs or spaces for indentation
- Using special symbols or styles for emphasis
Consider the example of printing a receipt. You would want items, quantities, and prices each on their own line, perhaps with headings and underlines for clarity. Like so:
```python
print('Receipt--------Item 1\t\(10Item 2\t\)15')
```
Which displays:
``
Receipt
--------
Item 1 \(10
Item 2 \)15
``
In this example, the \t character is used for horizontal tab spacing. Proper formatting enhances readability and user experience.