Coded_Correspondence - syntax error

I’m getting a syntax error for the line:

decoded = ''.join(decoded_message)        

in the following code. I’m not seeing what’s wrong. The caret is pointing to the last d in the first word “decoded”. Can someone help me out?

def decode(message):
    alphabet = 'abcdefghijklmnopqrstuvwxyz'
    decoded_message = []
    for i in message:
        if message[i] in alphabet:
            abc_index = alphabet.find(message[i])
            i = abc_index + 10 % 26
            decoded_message.append(message[i])
        else:
            decoded_message.append(message[i]
    decoded = ''.join(decoded_message)
    return decoded


  File "<ipython-input-8-a3f785cd5f0d>", line 11
    decoded = (''.join(decoded_message))
          ^
SyntaxError: invalid syntax

you can comment things out to rule out possible causes…

1 Like

I was missing a parenthese >…< Thanks for the help!

1 Like