title: Search list between specific index in Python
body: <p>I need to create a function that will search for a list-item between specific indexes. </p>
  
  <p>I want to have a start and stop index for the list, I want to find the position of the item in the list. </p>
  
  <p>For example:</p>
  
  <pre><code>def find(list, word, start=0, stop=-1):
      print("In function find()")
  
      for item in list:
          if item == word:
              return list[start:stop].index(word)
  
  n_list = ['one', 'five', 'three', 'eight', 'five', 'six', 'eight']
  print(find(n_list, "eight", start=4, stop=7 ))
  </code></pre>
  
  <p>This code will return "2", because the word "eight" is in the index position of 2 in list[4:7].</p>
  
  <p>My question: How can I change this code so that it returns "6"? If I remove the [4:7], it's giving me "3" because the word "eight" is also in the [3] position.</p>
  
  <p>Edit: forgot to say thank you!</p>