title: 8.22 Python IT17: Replacement words
body: <p>Ok so, I've been trying to figure out this Python 3 Programming task for school, and I can't seem to get it to work.
  Here the Prompt for the question</p>
  <blockquote>
  <p>Write a program that replaces words in a sentence. The input begins
  with word replacement pairs (original and replacement). The next line
  of input is the sentence where any word on the original list is
  replaced.</p>
  <p>Ex: If the input is:</p>
  <p>automobile car   manufacturer maker   children kids The automobile
  manufacturer recommends car seats for children if the automobile
  doesn't already have one.</p>
  <p>the output is:</p>
  <p>The car maker recommends car seats for kids if the car doesn't already
  have one.</p>
  <p>You can assume the original words are unique.</p>
  </blockquote>
  <p>Here's my current code/attempt:</p>
  <pre><code>replaceList = input()
  a1 = replaceList.split()
  
  sentence = input()
  for i in sentence:
      i = int(i)
      output = sentence.replace(a1[i], a1[i+1])
  print(output)
  </code></pre>