Skip to main content
 首页 » 编程设计

python之在 Python 中将 snake_case 转换为 lowerCamelCase

2025年05月04日15Leo_wl

<分区>

试图用它的大写变体替换 _(字符)。 例如:

hello_string_processing_in_python to helloStringProcessingInPython 

既然字符串在 Python 中是不可变的,那么如何高效地进行字符串替换呢?

ss = 'hello_string_processing_in_python' 
for i in re.finditer('_(\w)', ss): 
    ????