Replace print w/ stdout and add array val to format

The value in the braces should indicate the positional value of the
substitution string or the key in keyword arguments.