python:包含'e'和‘-’的 str 轉 float

python:包含’e’和‘-’的 str 轉 float from functools import reduce def str2float(s): s = s.split('.') a = s[0] b = s[1] if a[0] == '-': a = a[1:] front = reduce(lambda x,y:y+x
相關文章
相關標籤/搜索