Pyglatin: ending up


#1

Hello,

So I have just passed this one but I am struggling to see how… in the line of code below that it accepted, would the variable not be defined by the time it was used? I mean it worked, but seems sloppy…

 new_word = word[1:len(new_word)] + first + pyg 

 print new_word

PygLatin: Ending Up
#2

This is an alternative solution to the problem, getting the slice directly from word when defining new_word

this alternative solution would require you to use len(word)

len(new_word) can only be used by first defining new_word and then taking a slice

If you take an alternative to the exercise suggested solution, certain changes are required


#3

Thank you for clarifying that for me, the change makes sense and I have changed my script to match that which you have mentioned! Thank you!

new_word = word[1:len(word)]+ first + pyg

#4