Formatting Output with printf
Until now we’ve been outputting simple strings in a simple way. But if our output is destined to be read by a human being, we’re going to need something a bit better.
Very often, when doing data analysis and reporting, the data we’re producing isn’t for our own benefit. It’s destined for the marketing department, for sales, for executives—most of whom would run a mile rather than view output on the command line.
But outputting to the screen is such a cheap thing to do, in terms of development time, that it’s often the medium of first resort. Debugging information, programs that are used by developers, and many other applications will need to output to the terminal. Learning to make that output readable is a useful ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access