The function should return a new string, which has the same vowels (any of ‘aeiou’ or ‘AEIOU’)
<p>The function receives an input string (st) and a character (ch). The string st may  have letters, digits and symbols.  The function should return a new string, which has the same vowels (any of ‘aeiou’ or ‘AEIOU’) that the original string has, and in the same positions as in st , and for the other positions it should have the symbol ‘$’, but only including these characters  until and not including the first appearance of the character ch (even if ch is a vowel) . (The string being returned may be shorter than the original string, possibly the empty string as well).</p>

<p>An example:
vowels_or_not('abcdeAghi', 'A') should return 'a$$$e'</p>

<p>the replacing has to stop before the character (ch)</p>

<pre><code>def vowels_or_not(string, char):
    left, middle, right = string.parition(char)
    left = [(c if (c.lower() in "aeiou") else '$')
            for c in left]
    return ''.join(left)
return vowels_or_not(st, 'char') 
</code></pre>

<p>I can't figure out how not to include the character and how to only replace vowels up until that point.</p>
