title: Python: Finding the longest sentence in file
body: <p>I have a file (a book actually) in .txt.
  I have to find the longest sentence in this file.</p>
  
  <p>I tried:</p>
  
  <pre class="lang-py prettyprint-override"><code>print(max(open('file.txt', 'r'), key=len))
  </code></pre>
  
  <p>but it gives me only the longest line.</p>
  
  <p>Not sure how I should do that properly. Any advices?</p>