title: How to set and check a boolean flag in python
body: <p>I'm trying to do something like this with a boolean:</p>
  
  <pre><code>/* ... other stuff */
  loggedDocument = false
  for line in inFile:
    if (line.find( /*something*/ ) != -1):
      println("FOUND DOCUMENT: %s" % line)
      loggedDocument = true
    if (loggedDocument == false):
      /* do something else */
  </code></pre>
  
  <p>But I keep getting invalid syntax errors.  I googled but couldn't find a simple boolean example, any ideas?</p>