Counting the number of vowels
<p>Trying to print no. of vowels. When I run this code I get <code>1,2,3,4</code> I intend to print only 4. Where is my mistake and how would I correct it?</p>

<pre><code>vowels='a','e','i','o','u'
s= 'hellohello'
count = 0

for letters in s:
   if letters in vowels:
        count+=1
        print (count)
</code></pre>

<p><code>count</code> should be out of <code>for</code> loop.So that it prints only once.</p>

<pre><code>vowels='a','e','i','o','u'
s= 'hellohello'
count = 0 
for letters in s:
     if letters in vowels: 
           count+=1 
print (count)
</code></pre>

python python-3.x