Discuss / Python / 第三题

第三题

Topic source

Iris_3218

#1 Created at ... [Delete] [Delete and Lock User]
s=list(s)
    return reduce(lambda x,y:x*10+y,map(int,s[0:s.index('.')]))+reduce(lambda x,y:x*10+y,map(int,s[s.index('.')+1:]))*10**(-len(list(map(int,s[s.index('.')+1:]))))

  • 1

Reply