title: Python: change format for all elements in a list of strings
body: <p>I have a list of strings:</p>
  
  <pre><code>a = ['[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]',
       '[2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]',
       '[3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0]',
       '[4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0]',
       '[5.0, 5.0, 5.0]', 
       '[1.0]'
      ]
  </code></pre>
  
  <p>When I use the code as below, the format for every element in the list is string, not the int.</p>
  
  <pre><code>a= tuple(a.reshape(1,-1)[0])
  </code></pre>
  
  <p>What I need to do is change the format for all elements. Such as</p>
  
  <pre><code>a[1][2] = 2
  </code></pre>
  
  <p>However, in my code:</p>
  
  <pre><code>a[1][2] = '.'
  </code></pre>