Skip to content

Commit 85053f7

Browse files
1 parent e1b459a commit 85053f7

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

other/reverse_order_of_vowels.py

+23-23
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
def is_vowel(char: str) -> bool:
1818
"""
19-
returns True if the character is vowel else False
20-
>>> is_vowel('A')
21-
True
22-
>>> is_vowel('e')
23-
True
24-
>>> is_vowel('f')
25-
False
19+
returns True if the character is vowel else False
20+
>>> is_vowel('A')
21+
True
22+
>>> is_vowel('e')
23+
True
24+
>>> is_vowel('f')
25+
False
2626
"""
2727
vowels = ["A", "E", "I", "O", "U", "a", "e", "i", "o", "u"]
2828
# Check for empty string
@@ -33,14 +33,14 @@ def is_vowel(char: str) -> bool:
3333

3434
def get_vowels(string: str) -> list:
3535
"""
36-
Given a string returns vowels from it
37-
38-
>>> get_vowels('abcde')
39-
['a', 'e']
40-
>>> get_vowels('AEIou')
41-
['A', 'E', 'I', 'o', 'u']
42-
>>> get_vowels('bCFM')
43-
[]
36+
Given a string returns vowels from it
37+
38+
>>> get_vowels('abcde')
39+
['a', 'e']
40+
>>> get_vowels('AEIou')
41+
['A', 'E', 'I', 'o', 'u']
42+
>>> get_vowels('bCFM')
43+
[]
4444
"""
4545
vowels = list()
4646

@@ -57,14 +57,14 @@ def get_vowels(string: str) -> list:
5757

5858
def reverse_vowels(string: str) -> str:
5959
"""
60-
Reverses the order of vowels in the given string
61-
62-
>>> reverse_vowels('Hello World')
63-
'Hollo Werld'
64-
>>> reverse_vowels('Algo & DS')
65-
'olgA & DS'
66-
>>> reverse_vowels('why')
67-
'why'
60+
Reverses the order of vowels in the given string
61+
62+
>>> reverse_vowels('Hello World')
63+
'Hollo Werld'
64+
>>> reverse_vowels('Algo & DS')
65+
'olgA & DS'
66+
>>> reverse_vowels('why')
67+
'why'
6868
"""
6969
vowels = get_vowels(string)
7070
answer = ""

0 commit comments

Comments
 (0)