Discuss / Python / 第一题

第一题

Topic source

燕喜泥润

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

1.把列表中的首字母改为大写字母,使用title()

def normalize(name):

return name.title()

 L1 = ['adam', 'LISA', 'barT']

L2 = list(map(normalize, L1))


  • 1

Reply