title: python search in text file
body: <p>i want to search for a variable "elementid" in a txt file</p>
  
  <pre><code>  f = open("wawi.txt", "r")
    r = f.read()
    f.close()
    for line in r:
        if elementid in line:
            print("elementid exists")
            break
  </code></pre>
  
  <p>the elementid is maybe 123456 </p>
  
  <p>the txt contains three lines:</p>
  
  <pre><code>1235
  56875
  123456
  </code></pre>
  
  <p>but the code does not print "elementid exists", why ?
  I work with python 3.4</p>