# -*- coding: utf-8 -*-
def normalize(name):
# 使用capitalize()函数将字符串的首字母转为大写,其余变为小写
return name.capitalize()
# 测试结果是否正确
L1 = ['adam', 'LISA', 'barT']
L2 = list(map(normalize, L1))
print(L2)
# -*- coding: utf-8 -*-
def normalize(name):
# 使用capitalize()函数将字符串的首字母转为大写,其余变为小写
return name.capitalize()
# 测试结果是否正确
L1 = ['adam', 'LISA', 'barT']
L2 = list(map(normalize, L1))
print(L2)