Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #79 from SarvasvX/patch-1
Browse files Browse the repository at this point in the history
Fixed error in code
  • Loading branch information
Chalarangelo committed Jul 9, 2019
2 parents 5424f64 + 63c84b7 commit 77d8ab9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions snippets/count_vowels.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 77d8ab9

Please sign in to comment.