Learn String Manipulation by Building a Cipher - Step 5

Tell us what’s happening:

Improved paragraph:

“This code aims to ensure that the numbers used for indexing the text and printing are the same. For example, in the text ‘Hello World,’ the letter ‘W’ is at index 6. By printing the index 6, we confirm that the indexing is consistent. If a different number is used in the print statement, it will output that number instead.”

Code:


text = 'Hello World'
W = text[6]
print(6)

text = 'Hello World'
W = text[10]
print(6)

### Your browser information:

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

### Challenge Information:
Learn String Manipulation by Building a Cipher - Step 5
https://www.freecodecamp.org/learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-5

You aren’t printing a character at an index in the string, you are printing a number.

Please do not open more than one thread per step.

https://forum.freecodecamp.org/t/learn-string-manipulation-by-building-a-cipher-step-5/688702/1