Computer Science (The Boredless Tourist)

I am currently doing this project → https://www.codecademy.com/paths/computer-science/tracks/cspath-cs-101/modules/cspath-boredless-tourist/projects/the-boredless-tourist

I don’t know step 59 is asking, how can I approach it?

This is my current code:

In 55 you create a list of places to see for that particular traveller. 59 asks you to add these places to the interests string created in 56 using some kind of looping.

The end result would be like- “Hi Erin Wilkes, we think you’ll like these places around Shanghai, China: Yu Garden, Yuz Museum”. So adding items from this list to this string one by one.

Hi thank you for replying, can you tell me what does this piece of code does? Can you explain more?

def get_attractions_for_traveler(traveler):

    traveler_destination = traveler[1]

    traveler_interests = traveler[2]

    traveler_attractions = find_attractions(traveler_destination, traveler_interests)

    

    interests_string = "Hi " + traveler[0] + ", we think you'll like these places around " + traveler_destination + ": "

    for x in range(len(traveler_attractions)):

        if traveler_attractions[-1] == traveler_attractions[x]:

            interests_string += "the" + traveler_attractions[x] + "."

        else:

            interests_string += "the" + traveler_attractions[x] + "."

    return interests_string

smills_france = get_attractions_for_traveler(['Dereck Smill', 'Paris, France', ['monument']])

print(smills_france)

I have watched the video but still don’t get it.