Discuss / Python / yeahhhhhhhhhhhhhhhh~~~

yeahhhhhhhhhhhhhhhh~~~

Topic source

skysmine

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

def normalize(name): s1=str.upper(name[0]) s2=str.lower(name[1:len(name)]) s=s1+s2 return s

测试:

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


  • 1

Reply