code: def pop(self):
          
          c = self.connection.cursor()
  
          first_tweet_id = c.execute("SELECT tweet from tweetlist where label='first_tweet'").next()[0]
  
          if first_tweet_id is None:
              # No tweets are in the list, so return None
              return None
  
          tweet = c.execute("SELECT id, message, previous_tweet, next_tweet from tweets WHERE id=?", (first_tweet_id,)).next()
  
          # Update the first tweet reference
          c.execute("UPDATE tweetlist SET tweet=? WHERE label='first_tweet'", (tweet[3],))
  
          # Update the "next tweet" if it exists
          if tweet[3] is not None:
              c.execute("UPDATE tweets SET previous_tweet=NULL WHERE id=?", (tweet[3],))
          else:
              #This was the last tweet so NULL the last tweet reference.
              c.execute("UPDATE tweetlist SET tweet=NULL WHERE label=?", ('last_tweet',))
          # Now remove the tweet from the list
          c.execute("DELETE FROM tweets WHERE id=?", (first_tweet_id,))
  
          self.connection.commit()
          c.close()
  
          return tweet[1]
docs: Return first tweet in the list.