Exercise 8: Reorder with .format() — Possible Solution ==================================================================== first = "Grace" last = "Hopper" print("{1}, {0}".format(first, last)) print("{0} {1}".format(first, last)) Output: Hopper, Grace Grace Hopper WHY THIS WORKS AS AN ANSWER ------------------------------ {0} always refers to .format()'s first argument (first) and {1} always refers to its second (last), regardless of the order the placeholders appear in the string itself. The first print() puts {1} before {0}, so last prints first — "Hopper, Grace" — without touching the order the arguments were passed in. The second print() simply uses {0} then {1} in that order, giving "Grace Hopper". This is the one genuine advantage indexed .format() placeholders have over a plain f-string: the same two variables can be rearranged, or even reused more than once, just by changing the numbers inside the { } without re-writing the expression each time.