The Boredless Tourist syntax error

i have this error when i write python3 script.py in the bash :
in he project : the bordeless tourist python

$ python3 script.py
** File “script.py”, line 6**
** def get_destination_index(destination):**
** ^**
SyntaxError: invalid syntax


destinations = ['Paris, France', 'Shanghai, China', 'Los Angeles, USA', 'São Paulo, Brazil', 'Cairo, Egypt']

test_traveler = [['Erin Wilkes', 'Shanghai, China', ['historical site', 'art']]

def get_destination_index(destination):

  destination_index = destinations.index(destination)

  return destination_index

print(get_destination_index("Los Angeles, USA"))

Hey!

Double check your opening and closing square brackets on test_traveler, remember every opening [ has to have a corresponding closing ] :slight_smile:

thank you very much i didn’t see that :expressionless:

1 Like