title: Write Code that does the same like Numpy's reshape
body: <p>I have to rewrite some Python Code, so that it is compatible with Python 3. Unfortunately one of my files imports Numpy, which isn't available for Python 3, yet. So I am trying to replace the Numpy-Code with normal Python Code. But I fail to replace Numpy's reshape-function.
  Reshape takes an array as input and reshapes it (changes number of rows/columns). For example:</p>
  
  <pre><code>a = arange(10).reshape(2,5)
  </code></pre>
  
  <p>creates an array of the form</p>
  
  <pre><code>[[0, 1, 2, 3, 4],
    5, 6, 7, 8, 9]
  </code></pre>
  
  <p>My idea was code like this:</p>
  
  <pre><code>list = range(10)
  matrix = []
  row = []
  for i in range(2):
      for j in range 5:
          row.append(list[j])
      matrix.append(row)
      row = []
  </code></pre>
  
  <p>But nested loops don't look very nice. Do you know a better way?</p>