Tell us what’s happening:
It’s telling me that. At the beginning of your loop body, print the result of comparing char with a space (’ '). Use the equality operator == for that. Could someone point out where I am going wrong?
Your code so far
# User Editable Region
text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''
for char in text.lower():
print(char == '')
index = alphabet.find(char)
new_index = index + shift
encrypted_text += alphabet[new_index]
print('char:', char, 'encrypted text:', encrypted_text)
# User Editable Region
Challenge Information:
Learn String Manipulation by Building a Cipher - Step 40