Discuss / Python / 为什么会报错

为什么会报错

Topic source

luowb2004

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

    from functools import reduce

    a=s.index(".")

    b=int(s[:a-1])

    c=int(s[a+1:])

    d=a+c/(10**(len(s)-a-1)

    return d


  • 1

Reply