用的是python3.7
def format_name(s):
return s[0].upper() + s[1:].lower()
print (map(format_name, ['adam', 'LISA', 'barT']))
<map object at 0x000001F85BD50978>
def format_name(s):
return s[0].upper() + s[1:].lower()
print (map(format_name, ['adam', 'LISA', 'barT']))
<map object at 0x000001F85BD50978>
2018-08-22
举报