title: Python find first of multiple (single character) substrings
body: <p>What's the most Pythonic way to find the first of multiple single character substrings (if any) in a string?  </p>
  
  <p>To be clear, a string can contain multiple characters of interest and I want to find the first one - any one, I don't care which &amp; don't need to know which. I just want to know that one of those characters occurred and the first point in the string where any of them occurred (thus, clearly not a dupe of the suggested question). </p>
  
  <pre><code>endDigitPos = digitText.find(['u', ' ', ')', '}', '/*'])
  </code></pre>
  
  <p>Isn't doing it</p>
  
  <p>I am generically parsing C code - any C code. I am actually looking for hex strings, which start with <code>0x</code>; having found that, I want to find the end of the hex string, which will be a space a close bracket, a space, a <code>u</code> if it is unsigned, or the end of line.</p>
  
  <p><code>digitText</code> starts <code>0x</code> and ends with one of those chars.</p>
  
  <p>The code above gives</p>
  
  <pre><code>endDigitPos = digitText.find(['u', ' ', ')', '}', '/*'])
  TypeError: must be str, not list
  </code></pre>