title: Can someone explain this Python operation: b[:b.index(i)]+b[b.index(i)+1:]?
body: <p>I found an answer to the question:</p>
  
  <blockquote>
    <p>Write a Python program to make a new string with all the consonants deleted from the string "Hello, have a good day".</p>
  </blockquote>
  
  <p>But I do not understand what is the meaning of this line:<br>
   <code>b = b[:b.index(i)]+b[b.index(i)+1:]</code></p>
  
  <p>The full code:</p>
  
  <pre><code>a = ['a','e','i','o','u','A','E','I','O','U',' ']
  b = "Hello, have a good day"
  for i in b:
    if i not in a:
      b = b[:b.index(i)]+b[b.index(i)+1:]
  print(b)
  </code></pre>