# Learn String Manipulation by Building a Cipher - Step 37

**URL:** <https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-37/658800>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [December 27, 2023, 12:22pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-37/658800 "2023-12-27T12:22:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lavishabhagnani1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lavishabhagnani1/32/336395_2.png) [@lavishabhagnani1](https://forum.freecodecamp.org/u/lavishabhagnani1)\
**Post date:** [December 27, 2023, 12:22pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-37/658800/1 "2023-12-27T12:22:28Z")

</div>

why its not accepting my code its asking to compare `char` with an empty space using the equality operator.  
and this is what i have done  
print( char == )

### Your code so far

```py

/* 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 */

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15`

### Challenge Information:

Learn String Manipulation by Building a Cipher - Step 37

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-37)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![Jyothsna13](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jyothsna13/32/320418_2.png) [@Jyothsna13](https://forum.freecodecamp.org/u/Jyothsna13)\
**Post date:** [December 27, 2023, 12:26pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-37/658800/2 "2023-12-27T12:26:54Z")

</div>

hello! @lavishabhagnani1

We will compare empty space by using ‘_singlespace_’.

Eg:

`letter == ' '`

empty space are also enclosed with quotes.

Good luck!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 27, 2024, 12:27am UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-37/658800/3 "2024-06-27T00:27:13Z")

</div>

Closed on June 27, 2024, 12:27am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
