title: How to use a list comprehension to read from a function and create a new list?
body: <p>Using list comprehension to extract all the tweets in the tweets_and_more list and save them in another list called tweets. Print the length of the resulting list. Also, print the first three elements of the new list.</p>
  
  <pre><code>start_tag = "&lt;tweet&gt;"
  
  def extract_tweet(data):
      start = data.index("&lt;tweet&gt;")+len(start_tag)
      end = data.index("&lt;/tweet&gt;")
      seq = data[start:end]
      return seq
  </code></pre>
  
  <p>This is my extract tweet function</p>
  
  <p>My list with all the tweets line by line is saved in a list called "tweets_and_more"</p>
  
  <p>I'm having a hard time figuring out how to use List compression to do this.  I can do it using a loop I guess but any help with explanation would be great.</p>