summaryrefslogtreecommitdiff
path: root/progs/a494.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a494.py')
-rw-r--r--progs/a494.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/progs/a494.py b/progs/a494.py
new file mode 100644
index 0000000..a37dd5f
--- /dev/null
+++ b/progs/a494.py
@@ -0,0 +1,13 @@
+def reverse_vowels(str1):
+ vowels = ""
+ for char in str1:
+ if char in "aeiouAEIOU":
+ vowels += char
+ result_string = ""
+ for char in str1:
+ if char in "aeiouAEIOU":
+ result_string += vowels[-1]
+ vowels = vowels[:-1]
+ else:
+ result_string += char
+ return result_string \ No newline at end of file