串的处理
代码
s = input().split()
l_new = []
for i in s:i = list(i)new=""for j in range(len(i)-1): # 遍历new+=i[j]if i[j].isdigit() and i[j+1].isalpha(): # 在字母和数字之间添加“_”new+='_'if i[j].isalpha() and i[j+1].isdigit(): # 同上new+='_'new+=i[-1]l_new.append(new)
s_new = " ".join([i[0].upper()+i[1:] for i in l_new]) # 将处理好的字符串赋给s_new
print(s_new)