def camel_case(s): """ 转换为驼峰命名(小驼峰) """ if not s: return s parts = iter(s.split("_")) return next(parts) + "".join(i.title() for i in parts)