title: Search function python
body: <p>Hi Im trying to create a search function in python, that goes through a list and searches for an element in it. </p>
  
  <p>so far ive got </p>
  
  <pre><code>def search_func(list, x)
  
        if list &lt; 0:
              return("failure")
        else:
              x = list[0]
  
        while x &gt; list:
              x = list [0] + 1    &lt;----  how would you tell python to go to the next element in the list ? 
        if (x = TargetValue):
            return "success"
        else 
            return "failure" 
  </code></pre>