Discuss / Python / 第一题

第一题

Topic source

桑椅_76540

#1 Created at ... [Delete] [Delete and Lock User]

def normalize(name): return name[0:1].upper()+name[1:].lower()

测试:

L1 = ['adam', 'LISA', 'barT'] L2 = list(map(normalize, L1)) print(L2)


  • 1

Reply