In the first lesson of pyglatin I've created this code. I know there are other ways to do this. I learned later on in the lessons that it was supposed to do otherwise.
But I was wondering, what will be the most efficient way to do this?
I've created this as example:
Instead of exit the question with empty, I'm asking again for a valid answer.
and instead of using other variables I made it into one line to print. I believe the result is the same?
word = raw_input("Please enter a word: ") while len(word) <= 0: print("please try again") word = raw_input("Please enter a word: ") print(word[1:]+ word + "ay")