Learn String Manipulation by Building a Cipher - Step 7

Tell us what’s happening:

You can access the number of characters in a string with the built-in len() function.

Modify your existing print() call by passing len(text) instead of text[-1].

Your code so far


# User Editable Region

text = 'Hello World'
print(text[-1])
print(len(text[-1]))

# User Editable Region

Your browser information:

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

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 7

Welcome to the forum @nguyenphananh238

You only need one print call.

Modify your existing print() call by passing len(text) instead of text[-1] .

Please read the instructions carefully. You need to pass a specific argument to the len() call.

Happy coding