aboutsummaryrefslogtreecommitdiff
path: root/challenge-254/zapwai/python/ch-2.py
blob: 084bb3338368a631ecafd867707b0722473ec139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def proc(s):
    vow = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
    stash = []
    print("Input:", s)
    for c in s:
        if c in vow:
            stash.append(c)
    print("Output: ", end='')
    for c in s:
        if c in vow:
            print(stash.pop(), end='')
        else:
            print(c, end='')
    print()

s = "Raku"
proc(s)
s = "Perl"
proc(s)
s = "Julia"
proc(s)
s = "Uiua"
proc(s)