title: Python - 'type' object is not subscriptable
body: <p>So i've got this code which takes an unsorted list and two integers and then searches to see if there's a value in the list than is higher than one of the integers and lower than the other, everytime i run it i get "'type' object is not subscriptable" which makes absolutely no sense to me as i'm a beginner... Please help.</p>
  
  <pre><code>def unsortedSearch(list1, i, u):
      found = False
      pos = 0
      pos2 = 0
  
      while pos &lt; len(list1) and not found:
          if list[pos] &lt; u :
              if list[pos2] &gt; i:
                  found = True
              pos2 = pos2 + 1
          pos = pos + 1
      return found
  
  unsortedList = ['1', '3', '4', '2', '6', '9', '2', '1', '3', '7']
  num1 = '3'
  num2 = '5'
  
  isItThere = unsortedSearch(unsortedList, num1, num2)
  
  if isItThere:
      print ("There is a number between those values")
  else:
      print ("There isn't a number between those values")
  </code></pre>