10. Ending Up (new_word)


pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = [1:len(new_word)]

if len(original) > 0 and original.isalpha():
print original
print 'empty'

That is my code right now. Directions are "Set new_word equal to the slice from the 1st index all the way to the end of new_word. Use [1:len(new_word)] to do this."

Stuck not sure what to do - console says sintax error


Hi @chris27d,

This is not a complete statement ...

new_word = [1:len(new_word)]

The slice specifier, [1:len(new_word)], must be preceded by an expression representing the string you want to slice. In this case, that expression would be new_word.


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