title: CodeHS Python, remove all from string
body: <p>I am using CodeHS for my Computer Science Principles class and one of the problems in the Strings section is really confusing me. We have to remove all of one string from another string. </p>
  
  <p>These are the official instructions:</p>
  
  <blockquote>
    <p>Write a function called remove_all_from_string that takes two strings, and returns a copy of the first string with all instances of the second string removed. You can assume that the second string is only one letter, like "a".</p>
  </blockquote>
  
  <p>We <strong>are required</strong> use:</p>
  
  <ol>
  <li>A function definition with parameters</li>
  <li>A while loop</li>
  <li>The find method</li>
  <li>Slicing and the + operator</li>
  <li>A return statement</li>
  </ol>
  
  <p>We are expected to only have to use those 5 things to make it work. 
  I attempted to write this program but my function doesn't do anything and I am really stumped. </p>
  
  <pre><code>def remove_all_from_string(word, letter):
      while letter in word:
          x=word.find(letter)
          if x==-1:
              continue
          else:
              return x
  
      print word[:x] + word[x+1:]
  
  remove_all_from_string("alabama", "a")
  </code></pre>