Merge pull request #79 from SarvasvX/patch-1

Fixed error in code
This commit is contained in:
Angelos Chalaris
2019-07-10 00:20:37 +03:00
committed by GitHub

View File

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