A for loop takes one value at a time from a list. Indent its body so Python knows which lines to repeat.
Print a separate sign for each stop on a route.
stops = ["Elm", "Pine"]
for stop in stops:
print(f"Next: {stop}")
# Next: Elm
# Next: PineThe first pass uses Elm and the second uses Pine. Instead of printing inside a loop, you can save a value each time with a list’s append method.
Finish the loop in the editor. Return a new list containing the length of each label, including blanks and repeated labels. For example, label_lengths(['Ox', '', 'Ox']) returns [2, 0, 2].