title: Differentiating Python variables as str or int
body: <p>I have a file that has 3 values on each line.  It is a fairly random file, and any of these values can be str or int.</p>
  
  <pre><code>George, 34s, Nikon
  
  42, absent, Alan
  
  apple, 111, 41
  
  marked, 15, never
  
  ...
  </code></pre>
  
  <p>So, I read in the line, and using split I get the first value:</p>
  
  <pre><code>theFile = r"C:\... "
  
  tDC = open(theFile, "r")
  
  for theLine in tDC:
  
          a, b, c = theLine.split(',')
  </code></pre>
  
  <p>So far so good.</p>
  
  <p>Where I'm stuck is when I try to deal with variable <code>a</code>.  I need to deal with it differently if it is a str or if it is an int.  I tried setting <code>a = int(a)</code>, but if it is a string (e.g., 'George') then I get an error.  I tried <code>if type(a) = int</code> or <code>if isinstance(a,int)</code>, but neither work because all the values come in as a string!</p>
  
  <p>So, how do I evaluate the value NOT looking at its assigned 'type'?  Specifically, I want to read all the <code>a</code>'s and find the maximum value of all the numbers (they'll be integers, but could be large -- six digits, perhaps).  </p>
  
  <p>Is there a way to read in the line so that numbers come in as numbers and strings come in as strings, or perhaps there is a way to evaluate the value itself without looking at the type?</p>