#作业1def nonmalize(name): name=name[0].upper+name[1:].lower() return name#作业2from functools import reducedef prod(L): L=reduce(lambda a,b:a*b,L) return L#作业3from functools import reducedef str2float(s): def a(x,y): return x*10+y n=s.index('.') str1=list(map(int,s[0:n])) str2=list(map(int,s[n+1:])) return reduce(a,str1)+reduce(a,str2)/10**len(str2)
Sign in to make a reply
微笑的叶蓝秋