title: How can I append lines of text from a file to a list in between two specific lines?
body: <p>If I have a text file of the following:</p>
  
  <pre><code>Watermelon
  Carrot
  Spinach
  Lettuce
  Tomato
  Lemon
  </code></pre>
  
  <p>How would I append the lines from <code>Carrot</code> to <code>Tomato</code> (inclusive) into an empty list?</p>
  
  <pre><code>mylist = ['Carrot','Spinach','Lettuce','Tomato']
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>mylist = []
  for aline in file:
      aline = aline.rstrip('\n')
  if aline.startswith('Carrot')
      mylist.append(aline)
  </code></pre>
  
  <p>Which obviously just appends <code>'Carrot'</code> to the list but how can I make it keep appending till the stop point? </p>