Discuss / Python / 作业3

作业3

Topic source

    i=s.rfind('.')

    if i<0:

        i =0

    s=s.replace('.','')

    return reduce(lambda x,y:int(x)*10+int(y),s)*(0.1**i)


  • 1

Reply