# 下划线转驼峰 def str2Hump(text): arr = filter(None, text.lower().split('_')) res = '' j = 0 for i in arr: if j == 0: res = i else: res = res + i[0].upper() + i[1:] j += 1 return res