title: Python - How to get the number of lines in a text file
body: <p>I would like to know if it s possible to know how many lines contains my file text without using a command as :</p>
  
  <pre><code>with open('test.txt') as f:
      text = f.readlines()
      size = len(text)
  </code></pre>
  
  <p>My file is very huge so it s difficult to use this kind of approach...</p>