Compare dictionary values and key in python
<p>I have a dictionary <code>item</code>. It has strings as keys and the values are lists e.g.:</p>

<pre><code>item['title'] = [u'python']
item['image'] = [u'/link/to/image']
item['link'] = [u'link to article']
</code></pre>

<p>I want to check if any value is 0 in length, but link or image may be empty, so I did the following:</p>

<pre><code>        for key, value in item.iteritems():
            if len(value) == 0:
                if key != 'image' or key != 'link':
                    raise DropItem("Item is empty: %s" %item)                   
        return item
</code></pre>

<p>So an item should be dropped only if the value is 0 and it is not an image or a key. My problem is now that this condition does not work. The item is still dropped when the image or link is empty.</p>

<p>Any idea whats wrong? (I am new to python^^)</p>
