When do I have to write parameters between "[]"?

¡Hello! :hugs: I’m confused with step 47 in this exercise:

“Let’s test out our function! Call find_attractions() with "Los Angeles, USA" and ['art'] as the two arguments and save the results to la_arts .”

Both arguments belong to a list of their own, however, only art is between “”. Why aren’t both of them written between “” if they both belong to a list?

Thank you! (This is my first question, I hope I did it more or less well) :blush:

https://www.codecademy.com/paths/computer-science/tracks/cspath-cumulative-tourism/modules/cspath-boredless-tourist/projects/the-boredless-tourist

1 Like

Hello, @irislozano3016773534.

The function find_attractions() has two parameters:
destination, the name of a destination where we would like to visit, and
interests, a list of interests that we have.

The idea is to find attractions in that one city that each include at least one of the interests.

The function could have been designed many ways, but apparently it was deemed natural to enter the city as a single string, since in each case, there is only one city, and to enter the interests as a list, since there may be any number of interests. Since the function is designed to handle only one city at a time, there would be little point in entering it as a list.

2 Likes