Merge pull request #66 from kuingsamlee/master

fixed count_vowels function return value error.
This commit is contained in:
Angelos Chalaris
2019-07-18 08:18:50 +03:00
committed by GitHub

View File

@ -7,12 +7,9 @@ Use a regular expression to count the number of vowels `(A, E, I, O, U)` in a st
```python
import re
def count_vowels(str):
return len(re.findall(r'[aeiou]', str, re.IGNORECASE))
def count_vowels (str):
    return len (re.findall (r '[aeiou]', str, re.IGNORECASE))
`` `
`` `python
print(count_vowels('foobar')) # 3
print(count_vowels('gym'))# 0
count_vowels('foobar') # 3
count_vowels('gym')# 0
```