#10 Error


#1



https://www.codecademy.com/en/courses/python-beginner-2W5v7/1/4?curriculum_id=4f89dab3d788890003000096


It says that new_word contains pythonpay instead of ythonpay.


pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    word = original.lower()
    first = word[0]
    new_word = word + first + pyg
    new_word[1:len(new_word)]
else: 
    print 'empty'


#2

Hi @jnoltens,

What is the intention is this statement, and does it accomplish that intention? ...

    new_word[1:len(new_word)]

That is the key to the problem.


#3

Here is the answer
new_word=new_word[1:len(new_word)]


#4

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