title: Take integer only from a nested list and apply function to it
body: <p>I am super new at Python and I am facing a problem when converting a nested list to a list of integer only.</p>
  <p>I have this type of nested list in which all sub-list contains strings (digit and char)</p>
  <pre><code>lists = [['1', '2', '0', 'a', 'b'], ['3', '2', '1'], ['1','5', '5']]
  </code></pre>
  <p>I want to convert the digits to integer, and also put the char in one list. The output that I want is something like this</p>
  <pre><code>`new_lists = [[1, 2, 0, 'a', 'b'], [3, 2, 1], [1, 5, 5]]`
  </code></pre>
  <p>What would i do is something like this</p>
  <pre><code>for item in lists:
  new_list=[]
  if (in the first list item can be converted to integer):
      new_list.append(int(item))
  else:
    new_list.append(item)
  </code></pre>
  <p>How the string can be converted to an integer? Or is there any better way to do it?
  Thanks in advance</p>