利用切片和字符串拼接
def normalize(s):
return s[0].upper() + s[1:].lower()
L1 = ['adam', 'LISA', 'barT']
L2 = list(map(normalize, L1))
print(L2)
利用切片和字符串拼接
def normalize(s):
return s[0].upper() + s[1:].lower()
L1 = ['adam', 'LISA', 'barT']
L2 = list(map(normalize, L1))
print(L2)