title: SQLAlchemy - check if query found any results
body: <p>How can I check if a query found any results?</p>
  
  <pre><code>result = db.engine.execute(sql, id=foo)
  // check if result has rows ...
  for row in result:
    ...
  </code></pre>
  
  <p>Tried this:</p>
  
  <pre><code>if result is None:
      print("reuslt is None!")
  </code></pre>
  
  <p>and checked length:</p>
  
  <pre><code>print("result len", len(result))
  </code></pre>