蛇形转大驼峰

2022-06-30
1
def snake_to_pascal(word):
2
"""蛇形转大驼峰"""
3
4
if "_" in word:
5
words = word.split("_")
6
return "".join(word.title() for word in words)
7
return word.title()