For question 40: Look up that destination’s attractions by indexing into attractions
with destination_index
. Save this into the variable attractions_in_city
.
I initially tried to do this with a list comprehension, but it was giving me a syntax error. I checked against the learning and I don’t understand how my statement is different from the provided examples.
My attempt:
attractions_with_interest[attraction for attraction in attractions_in_city]
I tried adding in a statement before this where I declared it as a list (but i don’t think this is necessary) and it also didn’t work:
attractions_with_interest =