title: consonant deletion in list
body: <p>I am working on a function that 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>I have turned the string into a list in order to change the characters that aren't vowels into the symbol '$', but I do no understand how to make this change. Here is what I have tried,</p>
  
  <pre><code>def vowels_or_not (st, ch)
      newst=list(st)
      n= st.find('ch')
      nt=n+1
      sign='$'
      con=list('bcdfghjklmnpqrstvwxyz')
      for con in newst:
          del con
          del newst[nt:]    
      return sign.join(newst)
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>How can I do this?</p>