Tell us what’s happening:
i am not understanding how to do it
Before printing the current character, declare a variable called index
and assign the value returned by alphabet.find(char)
to this variable.
Your code so far
/* User Editable Region */
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = alphabet.find(char)
for char in text:
print(char)
/* User Editable Region */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 23