title: How to access the first character and integer pair in a Python string?
body: <p>I have several strings in Python. Let's assume each string is associated with a variable. These strings are only composed of characters and integers:</p>
  
  <pre><code>one = '74A76B217C'
  two = '8B7A1742B'
  three = '8123A9A8B'
  </code></pre>
  
  <p>I would like a conditional in my code which checks these strings if 'A' exists first, and if so, return the integer. </p>
  
  <p>So, in the example above, the first integer and first character is: for <code>one</code>, <code>74</code> and <code>A</code>; for <code>two</code>, <code>8</code> and <code>B</code>; for <code>three</code>, <code>8123</code> and <code>A</code>. </p>
  
  <p>For the function, <code>one</code> would return True, and 74; <code>two</code> would be False, and <code>three</code> would be 8123 and <code>A</code>. </p>
  
  <p>My problem is, I am not sure how to efficiently parse the strings in order to check for the first integer and character. </p>
  
  <p>In Python, there are methods to check whether the character exists in the string, e.g. </p>
  
  <pre><code>if 'A' in one:
      print('contains A')
  </code></pre>
  
  <p>But this doesn't take order into account order. What is the most efficient way to access the first character and first integer, or at least check whether the first character to occur in a string is of a certain identity? </p>