title: How to grab number after word in python
body: <p>I have a huge file containing the following lines <code>DDD-1126N|refseq:NP_285726|uniprotkb:P00112</code> and <code>DDD-1081N|uniprotkb:P12121</code>, I want to grab the number after <code>uniprotkb</code>.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>x = 'uniprotkb:P'
  f = open('m.txt')
  for line in f:
    print line.find(x) 
    print line[36:31 + len(x)]
  </code></pre>
  
  <p>The problem in <code>line.find(x)</code> is 10 and 26, I grab the complete number when it is 26. I'm new to programming, so I'm looking for something to grab the complete number after the word.</p>
  
  <pre><code>x = 'uniprotkb:'
  f = open('m.txt')
  for line in f:
    if x in line:
      print the number after x
  </code></pre>