title: Python ValueError: substring not found - Error defining a word
body: <p>I'm trying to make a program that when you type a sentence it asks for a word to search and it will tell you where in the sentence it sentence occurs 
  the code is as follows:</p>
  
  <pre><code>loop=1
  while loop:
      sent = str(input("Please type a sentence without punctuation:"))
      lows = sent.lower()
      word = str(input("please enter a word you would want me to locate:"))
      if word:
          pos = sent.index(word)
          pos = pos + 1
          print(word, "appears at the number:",pos,"in the sentence.")
      else:
          print ("this word isnt in the sentence, try again")
          loop + 1
          loop = int(input("Do you want to end ? (yes = 0); no = 1):"))
  </code></pre>
  
  <p>It seems to work fine until I type it incorrectly eg hello my name is Will
  and the word I want to find is it instead of "sorry this doesn't occur in the sentence" but infact ValueError : substring not found</p>
  
  <p>I honestly dont know how to fix this and need help please.</p>