fixed count_vowels function return value error
This commit is contained in:
@ -9,10 +9,10 @@ import re
|
|||||||
|
|
||||||
|
|
||||||
def count_vowels(str):
|
def count_vowels(str):
|
||||||
return len(len(re.findall(r'[aeiou]', str, re.IGNORECASE)))
|
return len(re.findall(r'[aeiou]', str, re.IGNORECASE))
|
||||||
```
|
```
|
||||||
|
|
||||||
``` python
|
```python
|
||||||
count_vowels('foobar') # 3
|
count_vowels('foobar') # 3
|
||||||
count_vowels('gym') # 0
|
count_vowels('gym') # 0
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user