title: Extract individual values from numpy array into a list
body: <p>I am trying to extract the values from a numpy array and place the individual entries into a list. </p>
  
  <p>For example, if I have the following list:</p>
  
  <pre><code>import numpy as np
  x = 1
  problem_variable = np.array(['a', 'b'], dtype='&lt;U9')
  z = 2
  mylist = [x, problem_variable , z]
  # [1, array(['a', 'b'], dtype='&lt;U9'), 2]
  </code></pre>
  
  <p>How do I get the result</p>
  
  <pre><code>[1, 'a', 'b', 2]
  </code></pre>
  
  <p>I do not know the length of <code>problem_variable</code> before hand so cannot hard code <code>problem_variable[0]</code>, <code>problem_variable[1]</code> etc.</p>
  
  <p>The following does what I want but I am sure that I am missing the appropriate way to break the array apart. Thanks.</p>
  
  <pre><code>result = []
  result.append(x)
  for i in problem_variable: result.append(i)
  result.append(z)
  </code></pre>