fixed count_vowels function return value error

This commit is contained in:
kuingsamlee
2018-12-06 01:45:34 +08:00
parent 02a67bbb76
commit 05751a72a5

View File

@ -9,10 +9,10 @@ import re
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('gym') # 0
```