title: How to extract an ID number from a list of consistently formatted strings
body: <p>I'm working with a set of data that has names and usernames combined in one string. For example, if a user was named "John Smith" and his ID number was 1234567, the string would be "John Smith --- 1234567". The strings are consistently formatted in such a way that it is always:</p>
  
  <pre><code>NAME [space] 3 HYPHENS [space] ID number
  </code></pre>
  
  <p>I am trying to find a way to pull ID numbers out of these strings. I found that doing something like this:</p>
  
  <pre><code>foo = "John Smith --- 1234567"
  
  bar = [str(s) for s in foo.split() if s.isdigit()]
  </code></pre>
  
  <p>I get a list like this ['1234567']. This will work for my needs, but I'm wondering if there's a more "Pythonic"/clean way to do this? Is there a way to just get and int of the ID number returned, as opposed to a list with a string in it?</p>