title: match with any of the list items and break on first match
body: <p>I am very new to python and to programming in general. I am trying to match the words in a file to any one of the items in a list and once a match is found return true. My code does not break on the first match even if use break for the match.
  Please excuse for any obvious mistakes and bad coding style.</p>
  
  <pre><code>strings = ["string1", "string2", "string3", "string4"]
  node_file = open(filename, 'r')
  
  ##printing to check for first match
  for line in node_file:
      words = line.split(" ")
      for w in words:
          for string in strings:
              if re.match(string,w):
                  print 'found match' , w
                  break 
  </code></pre>