我有这个功能,但我不熟悉错误或如何纠正它。
def intify(file1):
numbers=range(0,10)
strnum=[]
for x in numbers:
strnum.append(str(x))
number1=[]
for line in file1:
for split in line.split(' '):
number1.append(split)
listnum=[]
for x in number1:
if x[0] in strnum:
listnum.append(x)
w=map(float, listnum)
#return w
print(w)
0x275b990 处的错误映射对象