title: How to search a specific text into Two dimensional array in Python
body: <p>I am new in python. I have a two dimensional list in django. Now I want to check if given text is in list or not. But its not working. Here is my code:</p>
  
  <pre><code>newmessage = 'Bye'
  
  stockWords = [
      ['hello', 'hi', 'hey', 'greetings'],
      ['Bye', 'Goodbye']
  ]
  
  
  for i in range(0, len(stockWords)):
      if newmessage.lower() in stockWords[i]: 
          return HttpResponse('Found')
      else:
          return HttpResponse('Not Found')
  </code></pre>
  
  <p>The problem is it works only for first element of list, the second one is not working. </p>
  
  <p>What am I doing wrong? Any suggestion?</p>