Slicing in python


I am stuck with slicing in python pyglatin exercise. My code looks like this:

pyg = 'ay'
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
    print word
    print 'empty'
print new_word[1:]

Now the error which is shown is: Oops, try again. It looks like you printed the correct translation of "kushal", but make sure to set new_word equal to the slice as well. Please help how to do that.


Right now you're just printing the sliced version of new_word, but the exercise is asking you to assign the entirety of new_word to be the sliced version of itself

so try something like new_word = new_word[1:] right before your final print statement, and in the print statement simply call new_word rather than new_word[1:]


Thanks a bunch for your reply shoelaces…worked like a charm!