为啥采用循环输出的只是首字母
def format_name(s): for x in s: return x[0].upper()+x[1:].lower() print map(format_name, ['adam', 'LISA', 'barT'])
def format_name(s): for x in s: return x[0].upper()+x[1:].lower() print map(format_name, ['adam', 'LISA', 'barT'])
2019-02-13
举报