I want to use the below code, but find the length of the longest word in a text file in python
<p>use this, but find in a text file, I am not sure how to do this.  </p>

<pre><code>len(max(words, key=len))
</code></pre>

<p>does anyone know how I can accomplish this? </p>

<p>also how do I find out how many times a 6 or 7 length word appears in a text file? </p>
