title: Write a function named spelling_corrector.
body: <p>Function should check each word in the input string against all the words in the correct_spells list and return a string such that:</p>
  
  <ul>
  <li><p>If a word in the original sentence matches exactly with a word in the
  correct_spells then the word is not modified and it should be
  directly copied to the output string.</p></li>
  <li><p>If a word in the sentence can match a word in the correct_spells list
  by replacing, inserting, or deleting a single character, then that
  word should be replaced by the correct word in the correct_spelled
  list.</p></li>
  <li><p>If neither of the two previous conditions is true, then the word in
  the original string should not be modified and should be directly
  copied to the output string.</p></li>
  </ul>
  
  <p>Notes:</p>
  
  <ul>
  <li><p>Do not spell check one or two letter words (copy them directly to the
  output string).</p></li>
  <li><p>In case of a tie use the first word from the correct_spelled list.</p></li>
  <li><p>Ignore capitalization, i.e. consider capital letters to be the same
  as lower case letters.</p></li>
  <li><p>All characters in the output string should all be in lower case
  letters.</p></li>
  <li><p>Assume that the input string only includes alphabetic characters and
  spaces. (a-z and A-Z)</p></li>
  <li><p>Remove extra spaces between the words.</p></li>
  <li><p>Remove spaces at the start and end of the output string.</p></li>
  </ul>
  
  <p>Examples:</p>
  
  <p><a href="http://i.stack.imgur.com/IMkKE.png" rel="nofollow">enter image description here</a></p>
  
  <p>Notice:</p>
  
  <ul>
  <li><p>In the first example 'thes' is not replaced with anything.</p></li>
  <li><p>In the first example both 'case' and 'car' could replace the 'cas' in the original sentence, but 'case' is selected because it was encountered first.</p></li>
  </ul>
  
  <p>This is the code that I've tried but hasn't been very useful:</p>
  
  <pre><code>def spelling_corrector(input_string,input_list):
  new_string = input_string.lower().split()
  count = 0
  for x in new_string:
      for y in input_list:
          for i in y:
              if i not in x:
                  count += 1
      if count == 1:
          print(y)
      if len(x) == len(y) or x not in input_list:
          print(x)
  
  spelling_corrector("Thes is the Firs cas", ['that','first','case','car'])`
  </code></pre>