In "Boys dance, girls dance, he dances, she dances" how to find the number of "dance" only and not "dances" (python)?)" : <p>In line,</p>

<pre><code>Boys dance, girls dance, he dances, she dances
</code></pre>

<p>how to count the number of times <code>dance</code> occurs without counting the number of times <code>dances</code> occurs (using a Python program)?</p>

<p>A method is</p>

<pre><code>&gt;&gt;&gt; var = "Boys dance, girls dance, he dances, she dances"
&gt;&gt;&gt; count1 = var.count("dance")
&gt;&gt;&gt; count2 = var.count("dances")
&gt;&gt;&gt; count = count1 - count2
&gt;&gt;&gt; count
2
&gt;&gt;&gt;
</code></pre>

<p>But it is too lengthy.</p>

<p>Is any one line method available? </p>
