title: How to extract certain letters from a string using Python
body: <p>I have a string 'A1T1730'</p>
  
  <p>From this I need to extract the second letter and the last four letters. For example, from  'A1T1730' I need to extract '1' and '1730'. I'm not sure how to do this in Python.</p>
  
  <p>I have the following right now which extracts every character from the string separately so can someone please help me update it as per the above need.</p>
  
  <pre><code>list = ['A1T1730']  
  for letter in list[0]:  
        print letter  
  </code></pre>
  
  <p>Which gives me the result of A, 1, T, 1, 7, 3, 0</p>