Discuss / Python / 第一题

第一题

Topic source

机修贾森

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

def normalize(name):

#return name.upper()[0] + name.lower()[1:]
return name.capitalize()

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


  • 1

Reply