def normalize(name):
s=name[0].upper() + name[1:].lower()
return s
测试:
L1 = ['adam', 'LISA', 'barT']
L2 = list(map(normalize, L1))
print(L2)
def normalize(name):
s=name[0].upper() + name[1:].lower()
return s
L1 = ['adam', 'LISA', 'barT']
L2 = list(map(normalize, L1))
print(L2)