List conversion - inplace
<p>I am trying to convert ['1','2','3','4'] to [1,2,3,4]
I want to make this conversion inplace. Is it possible to do it? If not, what is the optimal solution.</p>

<p>As long as the whole array fits in memory, you should just be able to step through it, replacing each item as you go:</p>

<pre><code># bigarray is ['1','2','3','4',...];

# loop through bigarray using index i
for i in range(len(bigarray)):
    # coerce bigarray[i] to int in place
    bigarray[i] = int(bigarray[i])

# bigarray is [1,2,3,4,...];
</code></pre>

<p>good luck!</p>

python arrays list in-place