为什么不对
def format_name(s):
L=[]
L[0]=s[0].upper()
for a in s[1:]:
L.append(a.lower())
return L
print map(format_name, ['adam', 'LISA', 'barT'])
def format_name(s):
L=[]
L[0]=s[0].upper()
for a in s[1:]:
L.append(a.lower())
return L
print map(format_name, ['adam', 'LISA', 'barT'])
2016-10-25
举报