6.1 Using the features of the print() function
In many cases, the print() function is the first function we learn about. The first script is often a variation on the following:
>>> print("Hello, world.")
Hello, world.
The print() function can display multiple values, with helpful spaces between items.
When we write this:
>>> count = 9973
>>> print("Final count", count)
Final count 9973
We can see that a space separator is included for us. Additionally, a line break, usually represented by the \n character, is printed after the values provided in the function.
Can we control this formatting? Can we change the extra characters that are supplied?
6.1.1 Getting ready
Consider this spreadsheet, used to record fuel consumption on a large sailboat. The CSV file has rows that look like this:
date,engine...