# Learn String Manipulation by Building a Cipher - Step 41

**URL:** <https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-41/669172>\
**Category:** General\
**Tags:** español\
**Created:** [February 2, 2024, 1:37am UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-41/669172 "2024-02-02T01:37:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martelliux](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@martelliux](https://forum.freecodecamp.org/u/martelliux)\
**Post date:** [February 2, 2024, 1:37am UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-41/669172/1 "2024-02-02T01:37:39Z")

</div>

### Tell us what’s happening:

Describe tu problema en detalle aquí.  
request to use print to print the result of comparing char with an empty space (’ ') using ==

### 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:

El agente de usuario es: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0 (Edition std-1)`

### Challenge Information:

Learn String Manipulation by Building a Cipher - Step 41

> **[freeCodeCamp.org](https://www.freecodecamp.org/espanol/learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-41)**
>
> Aprende a programar, ¡GRATIS!

---

<div class="post-metadata">

**Author:** ![franciscomelov](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/franciscomelov/32/257220_2.png) [@franciscomelov](https://forum.freecodecamp.org/u/franciscomelov)\
**Post date:** [February 2, 2024, 1:56am UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-41/669172/2 "2024-02-02T01:56:13Z")

</div>

> [@martelliux](#):
>
> `print(char == '')`

hay una diferencia entre tu código y las instrucciones

> comparing `char` with an empty space (`' '` ).

este es el espacio vacio que tienes que comparar

```auto
' '

```

esto es lo que estás comparando en tu código

```auto
''

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 7, 2025, 3:36pm UTC](https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-41/669172/3 "2025-01-07T15:36:57Z")

</div>

Closed on January 7, 2025, 3:36pm UTC


