title: Keep capitals in snake_case to camel case
body: <p>Below is my code and I was wondering if there was a way to keep caps the way they are?</p>
  <p>Such as &quot;num_to_SMS&quot; would still become &quot;numToSMS&quot;?</p>
  <pre><code>def to_camel(ident):
    return ''.join(x.capitalize() or '_' for x in ident.split('_'))
  
  print(to_camel('foo'))
  print(to_camel('raw_input'))
  print(to_camel('num2words'))
  print(to_camel('num_to_SMS'))
  </code></pre>
  <p>So far the last example outputs <code>numToSms</code> not <code>numToSMS</code> as desired.</p>