Discuss / Python / 交作业

交作业

Topic source

杨森-ys

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

第一题:

def normalize(name):

    return name.title()#用了title函数

第二题:

def prod(L):

    l=1

    for n in L:

     l=l*n

    return l

    reduce(prod,L)


  • 1

Reply