title: Get input prefix as int in Python
body: <p>In C++, if I have a string</p>
  
  <pre><code>string s = "123abc";
  </code></pre>
  
  <p>and I wanted to get the <code>123</code> part as an int, I'd do</p>
  
  <pre><code>istringstream ss(s);
  s &gt;&gt; myint;
  </code></pre>
  
  <p>leaving the <code>abc</code> part (if needed). How should this be done in Python?</p>