Python and RSS feeds - parse feeder
<p>I'm using feed parser in python and I'm a beginner in python.</p>

<pre><code>for post in d.entries:
    if test_word3 and test_word2 in post.title:
        print(post.title)
</code></pre>

<p>What I'm trying to do is make feed parser find a couple of words inside titles in the RSS feeds.</p>

<p>Note that <strong>and</strong> does not distribute across the <strong>in</strong> operator.</p>

<pre><code>if test_word3 in post.title and
   test_word2 in post.title:
</code></pre>

<p>should solve your problem.  What you wrote is evaluated as</p>

<pre><code>if test_word3 and (test_word2 in post.title):
</code></pre>

<p>... and this turns into ...</p>

<pre><code>if (test_word3 != "") and (test_word2 in post.title):
</code></pre>

<p>Simplifying a little ...
The Boolean value of a string is whether it's non-empty.
The Boolean value of an integer is whether it's non-zero.</p>

python parsing rss feed feedparser