Please save me from len the evil goblin!


#1



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


File "python", line 10
new_word = [1: len(new_word)]
^
SyntaxError: invalid syntax

i HAVE DONE EVERYTHING AS DIRECTED YET AM STILL GETTING AN ERROR MESSAGE.PLEASE HELP!!!


pyg = 'ay'

original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
    word = original.lower()
    first = word[0]
    print original
    print "The Pig latin of your name is:"
    new_word = word + first + pyg
    new_word = [1:len(new_word)]
    print new_word
    
    

else:
    print 'empty'


#2

You have to tell it what you're indexing.

new_word = new_word[1:len(new_word)]

#3

Thank you so much tekkie.

will try it now
you rock!!


#4

works great...thanks men


#5

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