模仿着高圆圆姐姐写的,还得再复习,运用了没学过的知识点
def a(x,y): return x*10 + y n=s.index('.') left=list(map(int,s[0:n])) right=list(map(int,s[n+1:])) f=reduce(a,left) + reduce(a,right)/(10**len(right)) return f
Sign in to make a reply
张康除
模仿着高圆圆姐姐写的,还得再复习,运用了没学过的知识点