Codington
0 of 6 problems solved • 0%

Exercise prompt

Repair the Draft Route

A passenger can suggest an extra stop without changing the route everyone else sees. The starter accidentally edits both routes.

Example

Compare two ways of preparing a spare list.

original = ["green"] same_list = original spare = original[:] same_list.append("gold") print(original) # ['green', 'gold'] print(spare) # ['green']

Assignment gave the existing list a second name. Slicing created a separate list with the entries that existed at that point.

Your task

Repair draft_route(stops, extra). Return a new list with extra added at the end. Preserve every original entry, including repeats, and leave stops unchanged.