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>I think it is better to use <a href="https://docs.python.org/3/library/functions.html?highlight=map#map" rel="nofollow"><code>map</code></a> for this kind of tasks. Which creates iterator, what means it is more memory efficient.</p>

<pre><code>l = list(map(int, l))
# here I convert it to list, but usually you would just iterate over it
# so you can just do
for item in map(int, l):
    ...
</code></pre>

python arrays list in-place