title: How to count the number of lines that start with the word 'the' in python
body: <p>I'm trying to get the number of lines that starts with the word "the" in a file  </p>
  
  <pre><code>def count_the(file_url):
      r = requests.get(file_url, stream=True)
      pat = re.search(r'^the', file_url)
      count = 0
      for line in r.iter_lines():
          if line.startswith('the'):`
              return count += 1
  </code></pre>