A librarian re-shelving a cart of books doesn't write a new instruction for each one — they just do the exact same thing, once per book, until the cart is empty.
Python has a way to write that down too: do this, once for every item.