Discuss / Python / 大家看看有没有优化的余地,第一题

大家看看有没有优化的余地,第一题

Topic source

14XJNY

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

!/usr/bin/python

print("Hello, World!"); L1 = ['adam', 'LISA', 'barT'] def f(a): b=a[0].upper() c=a[1:].lower() return b+c print(list(map(f,L1)))

def normalize(name): name = name.title() return name


  • 1

Reply