Discuss / Python / 这题是不是超纲了啊,我好菜T_T,大神帮我看看我这个写的有哪些问题

这题是不是超纲了啊,我好菜T_T,大神帮我看看我这个写的有哪些问题

Topic source

    t = list(s)

    u = t.remove('.')

    str = {'1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6}

    def fn(n):

        return str[n]

    def pn(x, y):

        return x * 10 + y

    return reduce(pn, map(fn, u)) / 1000


  • 1

Reply