Not Understanding Why it Works This Way


Not understanding why it works this way

I have already completed the entire thing but I don't understand why the code new_word= new_word[1:len(new_word)] works the way it does, but I understand everything before it. Please Help

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


But why do you not understand how new_word= new_word[1:len(new_word)] works? How do you think it works?


I know that len(new_word) takes the length of the new word but I don't understand what the 1: is there for, are we taking the second letter of the new word or what?


we want to out the first letter (is cool for our translation) so we want to get from the second letter (index 1) till end of of new_word


ohhhh I get it now, thanks a ton