例如:>>> convert('CamelCase')'camel_case'
例子:
>>> convert('CamelCase') 'camel_case'
为了避免在转换时出现双下划线,例如 camel_Case,请添加以下行:s2.replace('__', '_')