title: Getting AttributeError: 'str' object has no attribute 'readlines' when trying to call method
body: <p>So, I am trying to read only one line from a text file that I opened, but I keep getting this error: <code>AttributeError: 'str' object has no attribute 'readlines'</code>.</p>
  <p>Here is the code.
  I am not very comfortable in python.
  What should I do?</p>
  <pre><code>file = askopenfilename(filetypes = ((&quot;Text File&quot;, &quot;.txt&quot;), (&quot;All Files&quot;, &quot;.&quot;)),
                         title = &quot;Please, choose a file&quot;) 
  if file is None:
      return
  
  content = file.readlines()
  print(content[74])
  </code></pre>