I have a nested list, but i want to add a nested list inside the nested list
<p>I have a list like:</p>

<pre><code>[[21, 32, 32], [23, 34, 32], [32, 34, 57]]
</code></pre>

<p>I would like to convert each number to its own list like</p>

<pre><code>[[[21], [32], [32]], [[23], [34], [32]], [[32], [34], [57]]]
</code></pre>

<p>How would i do that?</p>

<p>Thanks!</p>

<p>Here is a method using <code>numpy.reshape()</code>:</p>

<pre><code>import numpy as np 
arr = np.array([[21, 32, 32], [23, 34, 32], [32, 34, 57]])

arr.reshape(3,3,1)

# array([[[21],
#         [32],
#         [32]],

#        [[23],
#         [34],
#         [32]],

#        [[32],
#         [34],
#         [57]]])
</code></pre>

python python-3.x