Learn String Manipulation by Building a Cipher - Step 30

Tell us what’s happening:

I keep trying but i get the same error which is

You should access the first letter in text with text[0].

Your code so far


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
text = 'Albatross'

for char in text.lower():
    index = alphabet.find(char)
        print(char,index)
            
        new_index = index + shift

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 30

where in your code you are trying to write that?

also please be careful with indentation, the lines inside for should all have the same indentation

where is Albatross coming from? you may want to reset the step at this point

Make sure to only follow these directions:

access the first letter in text and try to change it into a character of your choice. You will see the ouput disappear and an error appear.