title: How to import text file into Array in Python (Pyramid)
body: <p>Hi so I'm trying to do something pretty simple</p>
  
  <p>I have an <code>Array</code> with a ton of sentences being used randomly for a slideDown notification div. Since I don't want to have a really long 1 line in PyCharm I figured I could just import the sentences from a txt file into my <code>Array</code>.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/15910322/retrieving-data-from-a-txt-file-using-python">this</a> and <a href="https://stackoverflow.com/questions/14676265/how-to-read-text-file-into-a-list-or-array-with-python/14685073#14685073">this</a> so I imported <strong><a href="http://www.numpy.org/" rel="nofollow noreferrer">numpy</a></strong>, and using the code below, however, <em>it breaks</em>(and skips to my error messages) on the <code>success_msgs</code> line, I don't get an error too.</p>
  
  <pre><code>def create_request(self):
      # text_file = open("success_requests.txt", "r")
      # lines = text_file.readlines()
      # print lines
  
      success_msgs = loadtxt("success_request.txt", comments="#", delimiter="_", unpack=False)
      #success_msgs = ['The intro request was sent successfully', "Request sent off, let's see what happens!", "Request Sent. Good luck, may the force be with you.", "Request sent, that was great! Like Bacon."]
  </code></pre>
  
  <p>Any thoughts? :(</p>
  
  <p><br/>
  My Text File (which is in the same folder as the py file:</p>
  
  <pre><code>The intro request was sent successfully_
  Request sent off, let's see what happens!_
  Request Sent. Good luck, may the force be with you._
  Request sent, that was great! Like Bacon._
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/oMrjt.png" alt="enter image description here"></p>
  
  <p>Debugger<br/>
  <img src="https://i.stack.imgur.com/FzNDF.png" alt="enter image description here"><br/></p>
  
  <p><strong>my def genfromtxt</strong></p>
  
  <pre><code>def genfromtxt(fname, dtype=float, comments='#', delimiter=None,
             skiprows=0, skip_header=0, skip_footer=0, converters=None,
             missing='', missing_values=None, filling_values=None,
             usecols=None, names=None,
             excludelist=None, deletechars=None, replace_space='_',
             autostrip=False, case_sensitive=True, defaultfmt="f%i",
             unpack=None, usemask=False, loose=True, invalid_raise=True):
  </code></pre>
  
  <p>genfromtxt debug:</p>
  
  <p><img src="https://i.stack.imgur.com/lqHmM.png" alt="enter image description here"></p>