读入文件中空格分隔的数字,存入列表
with open("duru.txt","r") as file:
a=file.read()
b=[int(i) for i in a.split()]
print(b)
读入文件中每行显示的数字,存入列表
with open("duru2.txt","r") as file:
a=file.read()
c=[int(i) for i in a.split()]
print(c)
www.xxszxw.net
with open("duru.txt","r") as file:
a=file.read()
b=[int(i) for i in a.split()]
print(b)
with open("duru2.txt","r") as file:
a=file.read()
c=[int(i) for i in a.split()]
print(c)