title: In python, can I stop an input loop without using the break command?
body: <p>I'm desperate here. Trying to do a program for one of my classes and having so much trouble with it. I added an input loop because part of the requirements is that the user has to be able to enter as many lines of code as they want. Issue is, now I get the error that the index is out of range, and I think that's because I am breaking to stop the loop. </p>
  
  <p>Here's my code: </p>
  
  <pre><code>print ("This program will convert standard English to Pig Latin.")
  print("Enter as many lines as you want. To translate, enter a blank submission.")
  while True:
      textinput = (input("Please enter an English phrase: ")).lower()
      if textinput == "":
          break
  
  words = textinput.split()  
  first = words[0]
  way = 'way'
  ay = 'ay'
  vowels = ('a', 'e', 'i', 'o', 'u','A', 'E', 'I', 'O', 'U')
  sentence = ""
  
  for line in text:
      for words in text.split():
          if first in vowels:
              pig_words = word[0:] + way
              sentence = sentence + pig_words
          else:
              pig_words = first[1:] + first[0] + ay
              sentence = sentence + pig_words
  print (sentence)
  </code></pre>
  
  <p>I am definitely an amateur and could use all the help/advice I can get. </p>
  
  <p>THANKS SO MUCH</p>