You can format numbers using the
See Format Printing for details of some other options that are available.
You can build a string using the
% operator. The %8d place holder will ensure that the number takes exactly 8 spaces.
If you need to provide more than one argument on the right side, then they will need to be grouped into a tuple.
The output with "Number:%8d" prints a decimal in 8 spaces: