已知当前文件夹中data24.txt中有若干使用英文半角逗号分隔的整数,函数main()用来读取文件data24.txt中的内容,把每个数字乘以10,返回这些乘积结果组成的列表
输出总是有None
例如,如果文件中的内容为23,24
函数main()会返回[230,240]
```python
def main():
l1=[]
res=[]
resl=[]
with open("data24.txt","r") as f:
lst=f.read()
l=lst.split(",")
res=[int(i) for i in l]
for j in res:
count=j*10
resl.append(count)
return resl
print(main())
刚写的,提交显示回答正确
```
def main(file)
List=[]
with open(file,'r') as f:
for i in f.split(","):
List.append(int(i)*10)
f.close()
return List