title: Turning a List into an array of arrays in python
body: <p>So I have an input text file that looks like this:</p>
  
  <pre><code>0,0,0,0  
  0,0,1,0  
  0,1,0,0  
  0,1,1,1  
  1,0,0,0  
  1,0,1,0  
  1,1,0,1  
  1,1,1,1  
  </code></pre>
  
  <p>I have successfully read all of these lines into a list which looks like this:  </p>
  
  <pre><code>['0,0,0,0' , '0,0,1,0' , '0,1,0,0' , '0,1,1,1' , '1,0,0,0' , '1,0,1,0' , '1,1,0,1', '1,1,1,1'] 
  </code></pre>
  
  <p>My code for creating this list is </p>
  
  <pre><code>fileName = input("Filename:")
      file = open(fileName,'r')
      training = np.array(file.read().splitlines())
      for i in range(len(training)):
          a.append(training[i])
  </code></pre>
  
  <p>However I was wondering how I can turn the list into something that looks like this:  </p>
  
  <pre><code>[ [0,0,0,0] , [0,0,1,0] , [0,1,0,0] , [0,1,1,1] , [1,0,0,0] , [1,0,1,0] , [1,1,0,1] , [1,1,1,1] ]
  </code></pre>
  
  <p>If it is not clear, my list has value of type string but I want the type to be in int as well as in the format above.</p>
  
  <p>Please let me know if there is a way I can get this end result through changing my code or somehow doing some sort of conversion.</p>