Python taking elements from and array and putting them into a 2d array
<p>I have been trying to take elements from a array and put them into a 2d array and I was wondering if there was a way to do that?</p>

<p>for example</p>

<pre><code>h = ['H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'T']
a = Grid(3,3) #creates empty 2d array 
</code></pre>

<p>output would be </p>

<pre><code>H H H
H H H
H H T
</code></pre>

<p>I been doing something likes this.</p>

<pre><code>for row in range(a.getHeight()):
    for col in range(a.getWidth():
        for i in range(len(h):
            a[row][col] = h[i]
</code></pre>

<p>but i get this as the output:</p>

<pre><code>T T T
T T T
T T T
</code></pre>
