Why is it telling me this? (Ending Up) [SOLVED]


I am stuck at https://www.codecademy.com/courses/python-beginner-2W5v7/1/4?curriculum_id=4f89dab3d788890003000096#

This is the code:
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 = new_word[1:len(new_word)]
print original

print 'empty'

These are the error messages:
File "python", line 12
SyntaxError: invalid syntax


you aren't trying to slice from new_word you are trying to slice from what is typed in, which is the raw_input so you would put.
new_word = original[1:len(new_word)]


I solved it myself, but thanks for the suggestion!


I had an indentation issue, that's it.


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