title: Having trouble when replacing in a list-Python
body: <p>I am having trouble replacing lists on python, my code is below.</p>
  
  <pre><code>def words_open():
      global words
      wordsfile = open("words.txt","r")
      words_list = wordsfile.readlines()
      words = []
      for i in range(len(words_list)):
          words.append(words_list[i].strip())
      return words_list
      return words 
  
  def replace_symbol_for_letter(letter,symbol):
      print([s.replace(symbol,letter) for s in words])
      return words
  
  def enter_pairing():
      correct_symbol = False
      while correct_symbol == False:
          symbol = input("Please enter a symbol: ")
          if symbol not in symbols_list:
              correct_symbol = False
          elif symbol in symbols_list:
              correct_symbol = True
      correct_letter = False
      while correct_letter == False:
          letter = input("Please enter a letter: ")
          letter = letter.upper()
          if letter not in alphabet:
              correct_letter = False
          elif letter in alphabet:
              correct_letter = True
      current_pairings.append(symbol and letter)
      replace_symbol_for_letter(letter,symbol)
      return letter
      return symbol   
  </code></pre>
  
  <p>The code runs fine, without syntax errors, however I am having trouble replacing the 'words' list. 
  When I run the code this happens:</p>
  
  <pre><code>The words are: 
  #+/084&amp;"
  
  #3*#%#+
  
  8%203:
  
  ,1$&amp;
  
  !-*%
  
  .#7&amp;33&amp;
  
  #*#71%
  
  &amp;-&amp;641'2
  
  #))85
  
  9&amp;330*
  
  Please enter a symbol: #
  Please enter a letter: A
  ['A+/084&amp;"', 'A3*A%A+', '8%203:', ',1$&amp;', '!-*%', '.A7&amp;33&amp;', 'A*A71%', "&amp;-&amp;641'2", 'A))85',              '9&amp;330*']
  Please enter a symbol: +
  Please enter a letter: b
  ['#B/084&amp;"', '#3*#%#B', '8%203:', ',1$&amp;', '!-*%', '.#7&amp;33&amp;', '#*#71%', "&amp;-&amp;641'2", '#))85', '9&amp;330*']
  </code></pre>
  
  <p>As you can see the symbol is replaced to the letter, which works fine, however as soon as I enter a new symbol/letter pairing it deletes the previous replacement and the replaces it again. </p>
  
  <p>Thanks!</p>