title: Opening a .txt file in Python
body: <p>I'm trying to open a .txt file in Python with the following function.</p>
  
  <pre><code>def get_my_string():
     """Returns a string of the text"""
     f = open("/home/Documents/text.txt", 'r')
     string = str(f.read())
     f.close()
     return string
  </code></pre>
  
  <p>I want "string" to be a string of the text from the opened file. However, after calling the function above, "string" is an empty list.</p>