例如:
def tofloat(i):
return flt(i)
def addnums(numlist):
total = 0
for i in numlist:
total += tofloat(i)
return total
nums = [1 ,2 ,3]
addnums(nums)
本flt应该是float,但我很困惑无论是语法错误或运行时错误。
白板的微信
相关分类