Discuss / Python / 最后一题

最后一题

Topic source

叫小小兽

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

def str2float(s): sl = s.split('.') return reduce(lambda x,y:x10+y,list(map(int, sl[0]))) + reduce(lambda x,y:x10+y,list(map(int, sl[1])))/pow(10, len(sl[1]))


  • 1

Reply