title: Substitute for Len function
body: <p>I am writing a simple search algorithm. Below is my code.</p>
  
  <pre><code>def search(list_data,target_char):
      found = False
      position = 0
      while position &lt; len(list_data) and not found:
          if list_data[position] == target_char:
            found = True
          position += 1
      return found
  </code></pre>
  
  <p>However I am not supposed to use the len() or any other built in function. How may I do the same?</p>