title: Deleting a specific word from a file in python
body: <p>I am quite new to python and have just started importing text files. I have a text file which contains a list of words, I want to be able to enter a word and this word to be deleted from the text file. Can anyone explain how I can do this?</p>
  
  <pre><code>text_file=open('FILE.txt', 'r')
  ListText = text_file.read().split(',')
  DeletedWord=input('Enter the word you would like to delete:')
  NewList=(ListText.remove(DeletedWord))
  </code></pre>
  
  <p>I have this so far which takes the file and imports it into a list, I can then delete a word from the new list but want to delete the word also from the text file.</p>