title: Using line.split until white space
body: <p>Here is some of my code:</p>
  
  <pre><code>with open ('sampleID.txt', 'r') as inF:
          for line in inF:
              if 'Sample ID:' in line:
  
                  SID = line.split(':')[1]
  </code></pre>
  
  <p>The text file (sampleID.txt) has the following content:
  Sample ID: 110715516102 ABC</p>
  
  <p>Now the question is, how can I correct my code so that SID= 110715516102<br>
  The line.split is working but it includes a white-space and I want to avoid this.</p>
  
  <p>Many thanks for all your help/support</p>