title: Python change type of whole list?
body: <p>I would like to do something like this</p>
  
  <pre><code>def foo(x,dtype=long):
     return magic_function_changing_listtype_to_dtype(x)
  </code></pre>
  
  <p>i.e. a list full of str to a list full of int</p>
  
  <p>any easy way to do it for nested lists, i.e. change the type [['1'],['2']] -> int</p>