Python:map()的使用方法

来源:互联网 发布:stl map源码 编辑:程序博客网 时间:2024/06/06 08:36
def format_name(s):
    return s[0].upper() + s[1:].lower()  
       

print map(format_name, ['adam', 'LISA', 'barT'])