Why does when we assign a list into a variable like in “attractions_for_destination = attractions[destination_index]” and we modify(append) that variable(attractions_for_destination). The list(attractions) got modify. It should have only modify the variable not the original list.
def add_attraction(destination, attraction):
destination_index = get_destination_index(destination)
attractions_for_destination = attractions[destination_index]
attractions_for_destination.append(attraction)
return