Non camel case to Camel Case in python 3? <p>This program is meant to change something from normal to camelCase. EG: Not_Camel_case -> notCamelCase or Camel_Case to camelCase.</p> <pre><code>def titlecase(value): return "".join(word.title() for word in value.split("_")) def titlecase2(value): return value[:1].lower() + titlecase(value)[1:] def to_camel(value): return titlecase2(value) </code></pre> <p>This outputs what i want BUT..... This is for a competition and putting in Not_An_SMS returns notAnSms instead of notAnSMS? Also putting in num2words is supposed to return the same but instead my program capitalizes it like num2Words. What do i do to fix these problems?</p> <p>EDIT: I have to change things within the functions not the output as the comp directly checks the functions in particular to_camel.</p>