Review of a function code that can encrypt strings

Hello everyone,
I just finished my first bigger project on Code Cademy. The project was about two cryptosystems where you had to decrypt and encrypt messages.
Can someone give me a code review of the encryption function seen on the image?
The cryptosystem that the function is operating on works like that:

  1. You want to send a message, fx “Hello fellow coders” but do not want eavesdroppers to read the message
  2. You encrypt the message with a private key, fx “friend” by switching the letters in your message to the left by the amount of the index of the letters in the key where each letter in the message corresponds with a letter in the key. As in:
    message: hello fellow coders
    key: frien dfrien dfrien
    index of key letters in alphabet: 5 17 8 4 13 3 5 17 8 4 13 3 5 17 8 4 13
    Now h has index 7 in the alphabet and that index gets switched to the left by 5, so h becomes c and so on

I did this by defininf a list of each letter in the alphabet outside of the function, then I made two lists in the function that correspond with the message and the key as seen above. In a for loop I made a list of the indices that the key word has in the alphabet like the index list above.
At last I made a for loop that adds every letter in the alphabet where the letters from the messages gets switched to the left by the amount of the corresponding index.

My code is working but I think that there is a easier and more readable code to the task.
Any suggestions of improvement?