def to_camel_case(s): """Convert string to camel case.""" return (s[0].lower() + string.capwords(s, sep='_') .replace('_', '')[1:] if s else s)