擅长:python、mysql、java
<p>试试这个:</p>
<pre><code>for s in strings:
if 'http://' in s and not 'lulz' in s and not 'lmfao' in s and not '.png' in s:
# found it
pass
</code></pre>
<p>其他选项,如果您需要更灵活的选项:</p>
<pre><code>words = ('lmfao', '.png', 'lulz')
for s in strings:
if 'http://' in s and all(map(lambda x, y: x not in y, words, list(s * len(words))):
# found it
pass
</code></pre>