How to match every word in the list having single sentence using python
<p>how to match the below case 1 in python.. i want each and every word in the sentence to be matched with the list. </p>

<pre><code>l1=['there is a list of contents available in the fields']
&gt;&gt;&gt; 'there' in l1
False
&gt;&gt;&gt; 'there is a list of contents available in the fields' in l1
True
</code></pre>

<p>Simple way</p>

<pre><code>l1=['there is a list of contents available in the fields']
&gt;&gt;&gt; 'there' in l1[0]
True
</code></pre>

<p>Better way wil be to iterate to all element of list.</p>

<pre><code>l1=['there is a list of contents available in the fields']
print(bool([i for i in l1 if 'there' in i]))
</code></pre>

python