title: Why is the python index function execution time faster than my own linear search function?
body: <p>I'm doing an experiment comparing the execution time of the index function and my own linear search function. To my understanding, Python implements a linear search algorithm for the index function so the execution time should be roughly the same, shouldn't it?</p>
  
  <p>My own search function looks like this</p>
  
  <pre><code>def linearSearch (x,numList,length):      
      n = 0
      for i in range(length):
              n = n + 1
              if numList[i] == x:
                      return i, n
      return -1, n
  </code></pre>