title: How to set a variable equal to part of an input?
body: <p>Learning python and was interested in how to set a variable equal to part of an input.</p>
  
  <p>For example</p>
  
  <pre><code>x = int(input("Input a 4 digit number"))
  b = int(first 2 letters of x)
  c = int(last 2 letters of x)
  print b+c 
  </code></pre>
  
  <p>ex. If they input 2051, it would print 71.</p>
  
  <p>What notation would I need in b and c to complete this, or would I need something totally different?</p>