title: Removing random line from text file - Python
body: <p>I've just set up a twitter bot. It pulls it tweets at random from a text file and tweets it. Becuase Twitter does not allow duplicate tweets, how can I delete the tweet from the text file so it doesn't try and tweet it again?
  the relevant bits of code look like this:</p>
  
  <pre><code>while True:
   lines = open('tweets.txt').read().splitlines()
   tweet = random.choice(lines)
   twitter.update_status(status=tweet)
   print (tweet)
   sleepTime = random.randint(30, 60)
   time.sleep(sleepTime)
  </code></pre>
  
  <p>Edit:
  I need the .txt file to update/save without the last tweet in it. So that it doesn't try and read it again.</p>