九州体育网 - 十年信誉网站

关于作者

Discuss / Python / 有问题

有问题

Topic source

pd寻真者的谎言

#1 Created at ...

为什么我复制了评论的每一个答案,没有一个跑的出来?

微素谋

#2 Created at ...

我给你一份完美的

def normalize(name): return name[0].upper()+name[1:].lower()

def prod(L): return reduce((lambda x, y: x * y), L)

def str2float(s): digits = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, '0': 0, '.': ''} a = s.replace('.', '') return reduce(lambda x, y: x10 + y, map(lambda x: digits[x], a)) / 10 * (len(s) - s.index('.') - 1)

微素谋

#3 Created at ...

结尾的乘以号‘*’ 被编译器隐藏了


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.