Learn String Manipulation by Building a Cipher - Step 23

Tell us what’s happening:

what does it mean when it says assign alphabet.find(char) to new variable

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
index = 'alphabet.find(char[0].lower())' 
for char in text:
   print(char)

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 23

alphabet is a string. find() is a function which is used find items

here u r finding index of the char which is present in alphabet. for example if char is a then it will look for a in alphabet and returns it’s index.

at the beginning of the for loop before print function u should create a variable index and should assign to it as per the instruction to pass this step.