Nothing Returned for Single Character Output
<p>This is supposed to be part of a function that replaces consonants with <code>'$'</code> until the <code>"ch"</code> character is reached, where it will then stop. </p>

<p><strong>Examples:</strong></p>

<p><code>vowels_or_not(‘abcdeAghi’, ‘A’)</code> should return <code>‘a$$$e’</code></p>

<p><code>vowels_or_not(‘aaaaA’, ‘A’)</code> should return <code>‘aaaa’</code></p>

<p>My issue is that it isn't doing anything if the input string is only one character long. <code>vowels_or_not(a, X)</code> should return <code>a</code> and <code>vowels_or_not(x, A)</code> should return <code>$</code>. Everything else works fine. I tried fixing it but I still don't see anything wrong with the code, but then again I'm a beginner! Any help would be greatly appreciated.</p>

<pre><code>def vowels_or_not (st, ch)
    vowels = ('a','e','i','o','u','A','E','I','O','U')
    flag = True
    a = 0
    aux = ''
    while flag is True:
        for i in range(len(st)):        
            if (st[i] == ch):
                flag = False
                break
            else:
                if (st[i] in vowels):
                    aux = aux + st[i]
                    a = a + 1
                if (st[i] not in vowels):
                    aux = aux + '$'
                    a = a + 1
    return aux
</code></pre>
